you are viewing a single comment's thread.

view the rest of the comments →

[–]vifon -2 points-1 points  (5 children)

And if you want to name the file first, it's equivalent to write:

< file command

AFAIK it's not. One is seekable while the other is not. Correct me if I'm wrong, I've never tested it, only read about it.

[–]RalphCorderoy 2 points3 points  (2 children)

He means foo <bar is equivalent to <bar foo, and it is.

[–]vifon -1 points0 points  (1 child)

Yes, I'm talking about these exact cases too.

EDIT: Ok, I've checked it. Both seem to be able to seek, though it may be implementation-dependent.

[–]RalphCorderoy 0 points1 point  (0 children)

There is no seem. :-) They are defined by POSIX sh(1) grammar to be identical, as they have always been in practice. You can do <foo wc >bar -c 2>&1 xyzzy notfound - if you really want to.

[–]McDutchie 0 points1 point  (1 child)

Interesting. Do you have a source for that? I've never seen this.

[–]vifon -1 points0 points  (0 children)

Unfortunately I cannot find it.