Skip to content

Comment on Linux Commands for Developersparent

Comments

I can understand liking the regularity but in production code or web examples it shouldn't be done because of the overhead. However, your example doesn't make sense.

If sort, tai64nlocal, and ffmpeg are all happy to read stdin so you can do

    cat foo | sort ...
    cat foo | tai64nlocal ...
    cat foo | ffmpeg ...
then they can all have their stdin redirected instead by the shell:
    <foo sort ...
Similarly with stdout:
    ... | sort | cat >foo
becomes
    ... | sort >foo
In both cases regularity of having the filename at the start and end is preserved.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.