Xref: utzoo comp.os.misc:331 comp.unix.wizards:5714 Path: utzoo!mnetor!uunet!mcvax!jack From: jack@cwi.nl (Jack Jansen) Newsgroups: comp.os.misc,comp.unix.wizards Subject: Re: Command interfaces Message-ID: <142@piring.cwi.nl> Date: 9 Dec 87 15:41:45 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> Organization: AMOEBA project, CWI, Amsterdam Lines: 43 In article <5565@oberon.USC.EDU> blarson@skat.usc.edu (Bob Larson) writes: > [Discussing primos wildcards versus unix wildcards] >For example, how would you do the equivelent of this in unix: > >cmpf *>old>@@.(c,h) == -report ==.+cmpf -file > >(Explanation: compare all files in the old sub-directory ending in .c or >.h with the file of the same name in the current directory, and put >the output in the file of the same name with .cmpf appended. Non-files >(directories and segment directories) ending in .c or .h are ignored. >[I do prefer the output of diff -c to that of cmpf, but that isn't >what I'm talking about here.] Uhm, yes, unfortunately I find the 'feature' quite unusable. I *never* come up with the correct sequence of == and @@, so I have to type the command three times before I get it right. (really retype, that is. 'History mechanism' is something primos has never heard about). I definitely prefer for i in *.[ch]; do diff old/$i $i >$i.diff done (and you can add an 'if [ -d $i ]' if you really care about directories ending in .c or .h. I don't, because I don't *have* directories ending in .c or .h). And, to continue some gripes on primos wildcards: - I would expect them to work *always*. I.e. if I do TYPE @@ (TYPE is primos echo) I would expect a list of all files, *not* '@@'. - If I want all arguments on one line, and I use [WILD @@.TMP], and the result doesn't fit in 80 characters, I DO DEFINITELY NOT WANT IT TO TRUNCATE IT AT EIGHTY CHARS! I lost an important file that way: it was trying to generate a list containing PRECIOUSFILE.TMP, but, unfortunately, the .TMP started at position 81. So, it removed PRECIOUSFILE in stead. sigh. Sorry, there are some neat ideas in primos, but the command processor and it's wildcards is definitely *not* one of them. -- Jack Jansen, jack@cwi.nl (or jack@mcvax.uucp) The shell is my oyster.