Hint: Use sed to remove spaces from names.txt first.
--Adrian.
vick Julius wrote:
Hello everybody
I want to rename files with the new names from a text file, names.txt:
Brazilian coffee
Canadian maple
Korean car
i want to use the following script
for i in *.doc
do
for file in `cat names.txt`
do
mv $i $file....
I want to renmae all files (in *.doc) with the new names read from
names.txt file.
The problem is the names in the file names.txt have spaces...
Any idea?
Thanks
Vick
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html