Xref: utzoo comp.os.misc:332 comp.unix.wizards:5715 Path: utzoo!mnetor!uunet!mcvax!enea!ttds!draken!zap From: zap@draken.nada.kth.se (Svante Lindahl) Newsgroups: comp.os.misc,comp.unix.wizards Subject: Re: Command interfaces Message-ID: <239@draken.nada.kth.se> Date: 10 Dec 87 04:54:11 GMT References: <1257@boulder.Colorado.EDU> <6840002@hpcllmv.HP.COM> <9555@mimsy.UUCP> <798@rocky.STANFORD.EDU> <432@cresswell.quintus.UUCP> <3161@psuvax1.psu.edu> <5565@oberon.USC.EDU> Reply-To: zap@nada.kth.se (Svante Lindahl) Organization: The Royal Inst. of Techn., Stockholm Lines: 21 In article <5565@oberon.USC.EDU> blarson@skat.usc.edu (Bob Larson) writes: #For example, how would you do the equivelent of this in unix: # #cmpf *>old>@@.(c,h) == -report ==.+cmpf -file I can do it using either /bin/sh or csh, but it does require more typing than in Primos. The test for existence of the file is not necessary so these examples could be simplified at the expense of risking a few error messages to the terminal. C-shell: % foreach i (`cd old; ls *.[ch]`) > if (-r $i) diff -c old $i > $i.cmpf > end Bourne-shell: $ for i in `cd old; ls *.[ch]` ; do > if [ -r $i ] ; then diff -c old $i > $i.cmpf ; fi > done Svante Lindahl zap@nada.kth.se uunet!nada.kth.se!zap