pipes within a script
Paul John Falstad
pfalstad at spot.Princeton.EDU
Thu Oct 4 00:48:06 AEST 1990
In article <3022 at idunno.Princeton.EDU> I write:
>set nonomatch
>echo {~/tex/,~/tax/,~/foo/}*.{aux,dvi,log,toc} | grep -v \\\* | xargs rm
>
>or
>
>set nonomatch
>rm `echo { ... } | grep -v \\\*`
Oops, that's not all necessary.
rm {~/tex,~/tax,~/foo}/*.{aux,dvi,log,toc}
Someone pointed that out to me in email. I thought csh would give a
'no match' if you did "ls *.c *.aosfdji" if it found some .c files but no
.aosfdji files.
If this is all the original poster wanted to do, this is much better
than the sh script. I thought it was just an example.
(csh programming still sucks though)
Here is the address to complain to:
pfalstad at phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD CIS: 70016,1355
That address again,
sync at thumper.princeton.edu PLink:OHS738 GEnie:OHS738 CIS: 4128 143 1234 937
More information about the Comp.unix.shell
mailing list