Show using awk without data via STDIN

This is useful for those times you want to just do something in awk, -
on-the-fly, without having to rely on its standard input (STDIN).

It's especially handy when you want to perform floating-point
arithmetic, if you're not a shell like ZSH which does support it.
pull/79/head
terminalforlife 5 years ago
parent 8566d86739
commit fec416c763

@ -15,3 +15,6 @@ awk -v RS='' '/42B/' file
# display only first column from multi-column text
echo "first-column second-column third-column" | awk '{print $1}'
# Use awk solo; without the need for something via STDIN.
awk BEGIN'{printf("Example text.\n")}'

Loading…
Cancel
Save