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

RE: batch renaming



On Tue, 29 Feb 2000, Chen Shapira wrote:

> by using perl like this:
> 
> while(<*.for>) {
>   $oldname = $_;
>   s/\.for$/\.f/;
>   rename $oldname, $_;
> }

shell scripts, and doing:

ls -1 *.for|awk -F"." '{print "mv "$0" "$1".f"}'|sh

--Ariel
> 
> this takes all filenames ending with .for and renames them to .f
> 
> 
> 
> 
> =================================================================
> To unsubscribe, send mail to linux-il-request@linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request@linux.org.il
> 

--
Ariel Biener
e-mail: ariel@post.tau.ac.il           Work phone: 03-6406086
fingerprint = 07 D1 E5 3E EF 6D E5 82 0B E9 21 D4 3C 7D 8B BC


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il