FMeinicke's Wiki

Home

❯

Linux

❯

Commands

❯

awk

❯

Count from the end

Count from the end

May 26, 20251 min read

  • awk/print
  • awk/nf

print nf

Source

  • https://unix.stackexchange.com/a/64674/482223
echo "This is a test" | awk '{ print$(NF-2) }'
is

Graph View

Created with Quartz v4.5.0 © 2025

  • GitHub