Cshell question: taking wordlists as a single string
Peter da Silva
peter at ficc.ferranti.com
Sat Aug 18 01:15:51 AEST 1990
In article <3251 at syma.sussex.ac.uk>, andy at syma.sussex.ac.uk (Andy Clews) writes:
> I have a Csh script called "whatnews" ...
> foreach i ($*)
> Basically, then, can Cshell cope with word-lists as single arguments, or
> must I write a C program to do the job (or try sh or ksh?)
Try sh (not ksh, unless you don't care about portability: sh is more
universally available). By and large, csh is a poor language for writing
programs in. Sh is much better.
for i
do
...
done
This will properly handle your quoted args.
--
Peter da Silva. `-_-'
+1 713 274 5180. 'U`
peter at ferranti.com (currently not working)
peter at hackercorp.com
More information about the Comp.unix.questions
mailing list