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

Jeff Sampson jeff at alberta.UUCP
Mon Apr 16 14:09:15 AEST 1984


  The reason that ``cat xyz*'' is expanded and ``cat <xyz*''
is not has to do with the C getchar() call.  cat takes any
arguments on the command line that don't start with a ``-'',
expands them, and interprets them as filenames.  However, if
you use the ``<'' before the filename, the filename is actually
used as stdin and the filename is not put on the command line.
Therefore, cat thinks that you are typing in somthing from the
terminal.  Hope this helps.
--
				Curt Jeff Sampson
				  alberta!jeff
"Watch out, Mr. T.  From Tuktoyatuk, it's the ** eh? team **"



More information about the Comp.unix mailing list