From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Adrian C." 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 Message-ID: <4327C600.5020509@gmail.com> References: Reply-To: drupix@gmail.com Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: vick Julius Cc: linux-admin@vger.kernel.org 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 >