|
please help - script to list and rename
Hi Friend,
I have a small script to list all file FFAAAAABBBBB00001 and FFAAAAABBBBB00001.repaired (when I run another script, the orginal file will output another *.repaired file) in my unix directory, and reaname the output file FFAAAAABBBBB00001.repaired back to FFAAAABBBBB00001. However, it have some strange message below:
mv: illegal option -- r
mv: illegal option -- w
mv: illegal option -- x
mv: illegal option -- r
The script is:
echo Please input firstcodelist:
read firstcodlist
for filename in `ll FF$firstcodelist*`
do
mv $filename `echo $filename | cut -c 1-17`
done
can you help to modify or any other new good script for me?
Thank you all!!!
|