Comment on Linux Commands for DevelopersparentComments−ralph14yI 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.
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
then they can all have their stdin redirected instead by the shell: Similarly with stdout: becomes In both cases regularity of having the filename at the start and end is preserved.