From owner-freebsd-questions Wed Jan 22 23:51:40 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA04805 for questions-outgoing; Wed, 22 Jan 1997 23:51:40 -0800 (PST) Received: from gatekeeper.barcode.co.il (gatekeeper.barcode.co.il [192.116.93.17]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA04792 for ; Wed, 22 Jan 1997 23:51:34 -0800 (PST) Received: (from smap@localhost) by gatekeeper.barcode.co.il (8.7.5/8.6.12) id JAA21154; Thu, 23 Jan 1997 09:50:18 +0200 (IST) X-Authentication-Warning: gatekeeper.barcode.co.il: smap set sender to using -f Received: from localhost.barcode.co.il(127.0.0.1) by gatekeeper.barcode.co.il via smap (V1.3) id sma021147; Thu Jan 23 09:49:59 1997 Message-ID: <32E7181E.F34@barcode.co.il> Date: Thu, 23 Jan 1997 09:49:50 +0200 From: Nadav Eiron X-Mailer: Mozilla 3.0 (X11; I; SunOS 5.5 sun4m) MIME-Version: 1.0 To: Jim Bentley CC: freebsd-questions@freebsd.org Subject: Re: csh scripting References: <199701230036.SAA01696@main.intcomm.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Jim Bentley wrote: > > When attempting to execute a foreach command in csh script the variables are > not set correctly. > > foreach user (cat /usr/local/www/file.lst) > > The user variable is set equal to "cat /usr/local/www/file.lst" instead of > the the data in the lines of the file. > > Any ideas. > Thanks You need the backquotes, like so: foreach user (`cat /usr/local/www.file.lst`) Nadav