[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Script to rename files



-----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-----


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]