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

priili at ARDC.ARPA priili at ARDC.ARPA
Wed Apr 25 13:43:20 AEST 1984


From:      "Peter A. Riili" (MISD-WAD) <priili at ARDC.ARPA>

Due to the order of command line evaluation by the Shell, this difference
exists for any applicable command:

   cmd file             VS.              cmd < file

where "file" is given with one or more metacharacters: * ? []
This is because I/O redirection is performed BEFORE filename generation
(i.e. metacharacter expansion).

--Pete Riili, U.S. Army ARDC



More information about the Comp.unix mailing list