Line at a time scripts in csh

David I. Berg dberg at cod.NOSC.MIL
Tue Jan 24 03:58:33 AEST 1989


In article <909 at ubu.warwick.UUCP>, geoff at warwick.UUCP (Geoff Rimmer) writes:
> In article <4116 at paris.ics.uci.edu> posert at bonnie.ics.uci.edu (Bob Posert) writes:

> >	foreach i (`cat file`)
> >	#misc processing
> >	end
> >but i was set to each word, not line.

When I encountered the same problem I used an oscillating soft switch to
keep track of which word to which I was was pointing.  It's a kludge, but
it works.

> However, when I tried this just now, I realised that if there are any wild 
> cards (?,*,[,]) then it gives the strange error message "end: No match"

Set the environment variable "nonomatch" to eliminate no matches.

-- 
David I. Berg (dberg at nosc.mil)
GENISYS Information Systems, Inc., 4250 Pacific Hwy #118, San Diego, CA 92110
MILNET: dberg at nosc.mil
UUCP:   {akgua decvax dcdwest ucbvax}!sdcsvax!noscvax!dberg



More information about the Comp.unix.questions mailing list