Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2006 07:48:40 -0800 (PST)
From:      Angelo Christou <christou44@yahoo.com>
To:        Proniewski Patrick <patrick.proniewski@univ-lyon2.fr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Shell Script Help
Message-ID:  <20060129154840.12525.qmail@web37109.mail.mud.yahoo.com>
In-Reply-To: <2FCC7C5D-B26E-4337-93EF-A590E0C518EE@univ-lyon2.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Patrick,

Your suggestion works perfectly. Thank you very much for helping a learner such as myself.

Ang.



Proniewski Patrick <patrick.proniewski@univ-lyon2.fr> wrote: On 29 janv. 06, at 16:10, Angelo Christou wrote:

> list.txt contains:
>
> bob home 9002
> jim data 9005

> Running the following for each line is what I'm trying to do:
> myprogram bob home 9002
> myprogram jim data 9005
> and so on......

give this a try:

while read myline; do
    set -- $myline
    myprogram $1 $2 $3
done < list.txt



Patrick PRONIEWSKI
-- 
Administrateur Syst�me - SENTIER - Universit� Lumi�re Lyon 2




		
---------------------------------
Do you Yahoo!?
 With a free 1 GB, there's more in store with Yahoo! Mail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060129154840.12525.qmail>