linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* shell script question:How 2 assign several fields from a file to a variable?
@ 2005-09-14  5:35 vick Julius
  2005-09-14  6:08 ` Rick von Richter
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: vick Julius @ 2005-09-14  5:35 UTC (permalink / raw)
  To: linux-admin

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/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-14 15:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-14  5:35 shell script question:How 2 assign several fields from a file to a variable? vick Julius
2005-09-14  6:08 ` Rick von Richter
2005-09-14 14:58   ` Scott Taylor
2005-09-14 15:36     ` freddie
2005-09-14  6:14 ` Jeff Woods
2005-09-14  6:41 ` Adrian C.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).