An odd difference between "cat file" and "cat<file"

William L. Sebok wls at astrovax.UUCP
Thu Apr 19 05:57:03 AEST 1984


>>     (Note that the shell does not expand command names, either.  How
>>     would you like to see "ca* /etc/passwd" handled?)

> Well, "ca*" would only look in the current directory, but
> "/bin/ca* /etc/passwd" might actually work if the first file in "/bin"
> beginning with "ca" happened to be "/bin/cat".  In fact, it *does* work
> that way, at least with the System III Bourne shell - I tried
>
>	/bin/ca* /etc/passwd
>
> and, by golly, our password file came dribbling out on my terminal!
>	Guy Harris

Indeed I've just tried with the 4.2 BSD c-shell and the password file
also came dribbling out.
-- 
Bill Sebok			Princeton University, Astrophysics
{allegra,akgua,burl,cbosgd,decvax,ihnp4,kpno,princeton,vax135}!astrovax!wls



More information about the Comp.unix mailing list