From owner-freebsd-questions@FreeBSD.ORG Sun Jan 29 15:24:00 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F99316A420 for ; Sun, 29 Jan 2006 15:24:00 +0000 (GMT) (envelope-from patrick.proniewski@univ-lyon2.fr) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 844CF43D45 for ; Sun, 29 Jan 2006 15:23:58 +0000 (GMT) (envelope-from patrick.proniewski@univ-lyon2.fr) Received: from [10.0.2.2] (boleskine.patpro.net [82.235.12.223]) by smtp3-g19.free.fr (Postfix) with ESMTP id ABE094442C; Sun, 29 Jan 2006 16:23:57 +0100 (CET) In-Reply-To: <20060129151016.96211.qmail@web37109.mail.mud.yahoo.com> References: <20060129151016.96211.qmail@web37109.mail.mud.yahoo.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-3--820213746; protocol="application/pkcs7-signature" Message-Id: <2FCC7C5D-B26E-4337-93EF-A590E0C518EE@univ-lyon2.fr> From: Proniewski Patrick Date: Sun, 29 Jan 2006 16:24:19 +0100 To: Angelo Christou X-Mailer: Apple Mail (2.746.2) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Shell Script Help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2006 15:24:00 -0000 --Apple-Mail-3--820213746 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 --=20 Administrateur Syst=E8me - SENTIER - Universit=E9 Lumi=E8re Lyon 2 --Apple-Mail-3--820213746--