Xref: utzoo comp.os.misc:323 comp.unix.wizards:5570
Path: utzoo!mnetor!uunet!husc6!rutgers!rochester!bbn!uwmcsd1!ig!jade!ucbvax!bostic
From: bostic@ucbvax.BERKELEY.EDU (Keith Bostic)
Newsgroups: comp.os.misc,comp.unix.wizards
Subject: Re: Command interfaces
Message-ID: <22122@ucbvax.BERKELEY.EDU>
Date: 9 Dec 87 17:38:19 GMT
References: <1257@boulder.Colorado.EDU> <6840002@hpcllmv.HP.COM> <9555@mimsy.UUCP> <5565@oberon.USC.EDU>
Organization: University of California at Berkeley
Lines: 36

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
> 
> (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.

OK:

for i in *.[ch]; do
>	if [ -f $i ] ; then
>		cmp $i old/$i > $i.cmpf
>	fi
> done

Note, the above construct has, potentially, far more power than you needed.
Now, if you wish to argue that it's not a "command-line" interface, I would
agree.  And my response would be, in that case, that one of that complexity/
power is unncessary when you can have real programming interfaces.
Incidentally, you *can* put it on a single line...

> After several years of using primos, it is clear to me the unix way of
> handling wildcards is much less powerfull.

Depends how you delimit "wildcards".   I think I disagree.

> It is clear to me that power, ease of use, etc. have almost no
> relation to how operating systems are chosen anyway.

Chosen by whom?  If marketing was all it took, we'd all be running
you-know-what.

--keith