Any difference between "cat file" and "cat<file"?

Dave Sherman dave at utcsrgv.UUCP
Wed Apr 4 02:27:14 AEST 1984


A silly question from someone who like to squeeze every cycle possible
out of an 11/23:

Is there any reason to, or not to, have a file opened by the shell before
exec'ing a utility? For example:
	cat file		cat < file
	dd if=x of=y		dd < x > y
	lpr junk		lpr < junk

I realize that the number of keystrokes may differ, and occasionally
the utility will behave differently when it knows the file name (e.g.,
pr(1) will list the name if it knows it).

Are there any circumstances in which the shell would be faster at
opening the file? Are there any other consideration?


[I know, I know, I've just wasted more time wondering about this
 than all of UNIXdom will ever save by using one over the other...]



Dave Sherman
Toronto
-- 
 {allegra,cornell,decvax,ihnp4,linus,utzoo}!utcsrgv!dave



More information about the Comp.unix mailing list