Re:What does $0=$2 in awk do?
by piperswe on Sunday September 25, 2022 @10:57PM
(#32978839)
Same here. I use `cat` as a tool to read data from the filesystem into a pipeline, regardless if that's the initial intention of the tool. I don't want the input filename being to the right of the first manipulation command in a pipeline that's supposed to read left to right!
[ Parent
| on HN ]
Its actually part of the POSIX standard that redirections can be put anywhere in the command line, so one can do:
<file.txt sed 's/some/filter' | other_cmd
on any standard compliantish shell :) (I use zsh, and I know it also works for bash and dash)