An odd difference between "cat file" and "cat<file"
John DeTreville
jdd at allegra.UUCP
Thu Apr 19 03:03:13 AEST 1984
From: alan at allegra.UUCP (Alan S. Driscoll)
Newsgroups: net.unix
Subject: Re: An odd difference between "cat file" and "cat<file"
Date: Tue, 17-Apr-84 16:09:48 EST
>> I frankly don't know why there is a difference between cat ab* and
>> cat <ab*. It seems to me that file name expansion should be done
>> before anything else.
> So tell me, what would you expect to see if ab* matched two or more
> files?
I would have expected an error message, of course. I would also have
expected an error message after typing
cat < abc abd
In fact, both sh and csh silently ignore 'abc'. (Surprise!)
--
Alan S. Driscoll
AT&T Bell Laboratories
Well, not really. Instead of "cat < abc abd", try "echo < abc abd" and
see what happens.
Cheers,
John ("Illusions Destroyed, Cheap") DeTreville
Bell Labs, Murray Hill
More information about the Comp.unix
mailing list