linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "vick Julius" <julius_vick@hotmail.com>
To: linux-admin@vger.kernel.org
Subject: shell script question:How 2 assign several fields from a file to a variable?
Date: Wed, 14 Sep 2005 05:35:31 +0000	[thread overview]
Message-ID: <BAY20-F140F63F0ED660FA7ADE2259B9F0@phx.gbl> (raw)

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/


             reply	other threads:[~2005-09-14  5:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14  5:35 vick Julius [this message]
2005-09-14  6:08 ` shell script question:How 2 assign several fields from a file to a variable? 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.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY20-F140F63F0ED660FA7ADE2259B9F0@phx.gbl \
    --to=julius_vick@hotmail.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).