|
|
shell script to rename multiple files - Linux
|
Views : 676
|
|
Tagged in : Linux
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
shell script to rename multiple files:
Renaming multiple files in a folder is easy using linux shell script.
Save this file in a ".sh" extension to tell the system that this a shell script. Place this file inside the folder where you want to rename multiples files.
For example, here we have used the script to rename all .gif files to .jpg files.
#!/bin/bash
for x in *.gif;
do n=${x/.gif/.jpg};
echo $n;
mv $x $n;
done
Modify the script to your requirement.

|
|
By Ramya, On - 2009-11-07 |
|
|
|