From: "Adrian C." <drupix@gmail.com>
To: vick Julius <julius_vick@hotmail.com>
Cc: linux-admin@vger.kernel.org
Subject: Re: shell script question:How 2 assign several fields from a file to a variable?
Date: Wed, 14 Sep 2005 09:41:04 +0300 [thread overview]
Message-ID: <4327C600.5020509@gmail.com> (raw)
In-Reply-To: <BAY20-F140F63F0ED660FA7ADE2259B9F0@phx.gbl>
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/
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2005-09-14 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=4327C600.5020509@gmail.com \
--to=drupix@gmail.com \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.