Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 1996 10:32:22 -0400 (EDT)
From:      Chuck Robey <chuckr@Glue.umd.edu>
To:        Wayne Hernandez <hernanw@FSL.ORST.EDU>
Cc:        questions <freebsd-questions@freebsd.org>
Subject:   Re: foreach usage
Message-ID:  <Pine.OSF.3.91.960516103015.282A-100000@skipper.eng.umd.edu>
In-Reply-To: <Pine.SUN.3.91.960514072256.22378B-100000@picea.FSL.ORST.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
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!
----------------------------+-----------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.960516103015.282A-100000>