awk: print lines after match to end of file
If you mark the presence of your fence, then you can use it to decide to print the next line and after like:
awk 'x==1 {print $1} /Commands:/ {x=1}'
Note that 1,/Commands:/d
easily translates to awk
like:
awk 'NR==1, $1 == "Commands:" {next}; NF {print $1}'
A difference with sed
is that it will also work if Command:
is on the first line.
And the NF {print $1}
can be translated to sed
:
sed -n '1,/^Commands:/!s/^[[:blank:]]*\([^[:blank:]]\{1,\}\).*/\1/p'