Re: shell script question:How 2 assign several fields from a file to a variable? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
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
[Site Home] [Linux Newbie] [Audio] [Hams] [Kernel Newbies] [Memory] [Util Linux NG] [Security] [Netfilter] [Bugtraq] [Writing Drivers] [Photo] [Yosemite Photos] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Samba] [Video 4 Linux] [Git] [Linux Resources] [Fedora Users]
![]() |