Write the BASH shell script rename which will rename files in the current directory according to the following arguments: suffix to be replaced
The script should rename each matching regular file or symbolic link in the current directory by replacing the file name suffix with replacement suffix. For example:
rename a.txt a.text
will rename the file a.txt to a.text. However, no overwriting of existing files nor renaming of the special directories . and .. is allowed.
for i in `ls *.txt`
do
fname=`basename $i txt`
mv $i ${fname}text
done
Shopping In MUMBAI
Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top.
Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.
Friday, February 13, 2009
Program in UNIX rename which will rename files in the current directory according to the following arguments: suffix to be replaced
Posted by ars at 5:09 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment