Re: Script to rename files

From: Robert Spangler (bms_at_zoominternet.net)
Date: 06/04/05

  • Next message: Tom W.: "Can you access a FAT32 drive?"
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    Date: Fri, 3 Jun 2005 18:16:13 -0400
    
    

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On Friday 03 June 2005 04:19, Juan L. Pastor wrote:

    > Hi,
    >
    > I need a script to rename several files to docXXX.txt where XXX is a
    > number I can define, for example 054, and the following files will be
    > renamed as 055, 056,... Can you help?

    #!/bin/sh
    for f in XXX.txt; do
      mv $f `basename $f XXX.`XXX.
    done

    - --

    Regards
    Robert

    Smile... it increases your face value!
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.6 (GNU/Linux)

    iD8DBQFCoNa50xJrO8dQYHgRArx8AKCU0A7kmqGW4nawWS8r1mQ3c/4sOwCdGRsI
    hblE0MQjwFi6A82WUP0ySHs=
    =gN60
    -----END PGP SIGNATURE-----

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Tom W.: "Can you access a FAT32 drive?"