Gawk variables
From wikinotes
Arguments
Arguments are named like in bash,
$1
for the first,$2
for the second, etc.
$0
refers to the entire line.echo "foo" "bar" | awk 'BEGIN { print $1 $2 }' # foobar awk -f file.awk "foo" "bar" # akw scripts
Arguments are named like in bash,
$1
for the first,$2
for the second, etc.
$0
refers to the entire line.echo "foo" "bar" | awk 'BEGIN { print $1 $2 }' # foobar awk -f file.awk "foo" "bar" # akw scripts