From owner-freebsd-questions Thu May 16 07:32:29 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA07810 for questions-outgoing; Thu, 16 May 1996 07:32:29 -0700 (PDT) Received: from jolt.eng.umd.edu (jolt.eng.umd.edu [129.2.102.5]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id HAA07802 for ; Thu, 16 May 1996 07:32:25 -0700 (PDT) Received: from skipper.eng.umd.edu (skipper.eng.umd.edu [129.2.98.208]) by jolt.eng.umd.edu (8.7.5/8.7.3) with ESMTP id KAA15897; Thu, 16 May 1996 10:32:23 -0400 (EDT) Received: (from chuckr@localhost) by skipper.eng.umd.edu (8.7.5/8.7.3) id KAA30024; Thu, 16 May 1996 10:32:22 -0400 (EDT) Date: Thu, 16 May 1996 10:32:22 -0400 (EDT) From: Chuck Robey X-Sender: chuckr@skipper.eng.umd.edu To: Wayne Hernandez cc: questions Subject: Re: foreach usage In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 14 May 1996, Wayne Hernandez wrote: > > I am having problems with using foreach in a script, it works ok under > SunOS. > > Is there a better way for me to document what I did? > > > #!/bin/csh > set COLS = (Makefile bounce bounce-remind majordomo majordomo.pl > new-list resend wrapper wrapper.c) > echo $COLS > > foreach i ($COLS) ^ variable set is "i" > echo $i > diff ~hernanw/majordomo-1.93/$1 ~hernanw/test/majordomo-1.93/$1 > $1.diff ^ ^ variable used is "1" change the "1"s into "i"s. > end > > This process "Makefile", but does not process the rest. > > Wayne > > > > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and n3lxx, both FreeBSD (301) 220-2114 | version 2.2 current -- and great FUN! ----------------------------+-----------------------------------------------