comm '! sort file1' '! sort file2'
Arthur David Olson
ado at elsie.UUCP
Tue Sep 23 00:20:58 AEST 1986
I regularly want to run "comm" on a pair of unsorted files. So I ended up
writing a shell script to do the job, the guts of which (simplified for the
purposes of this article) is:
tmp=/tmp/\#scomm.$$
sort "$1" > $tmp
sort "$2" | comm $tmp -
rm $tmp
All fine and dandy. But then I got to thinking. . .that what I'd *really*
like to be able to do is use a command like
comm '! sort file1' '! sort file2'
(where the space after the '!' should be your clue that I use csh) and have
comm do the dirty work.
And then I got to thinking. . .that if fopen turned
fopen("!whatever", "r")
calls into
popen("whatever", "r")
calls (with other changes as necessary), then what I'd like to see happen
with the "comm" command would happen generally.
Comments?
--
UNIX is a registered trademark of AT&T.
--
UUCP: ..decvax!seismo!elsie!ado ARPA: elsie!ado at seismo.ARPA
DEC, VAX, Elsie & Ado are Digital, Borden & Ampex trademarks.
More information about the Comp.unix.wizards
mailing list