On Awk Loops

If you need to loop over a list of commandline args, Awk has pretty standard loops. Use the ARGC built-in variable to get the count of the arguments.

awk '
BEGIN {
  for (i = 1; i < ARGC; ++i) {
    print ARGV[i]
  }
}' One Two Three
# output:
# One
# Two
# Three