1*e6d6c189SCody Peter Mello#!/bin/bash 2*e6d6c189SCody Peter Mello 3*e6d6c189SCody Peter Melloif [[ -z "$AWK" ]]; then 4*e6d6c189SCody Peter Mello printf '$AWK must be set\n' >&2 5*e6d6c189SCody Peter Mello exit 1 6*e6d6c189SCody Peter Mellofi 7*e6d6c189SCody Peter Mello 8*e6d6c189SCody Peter Mello$AWK 'BEGIN { 9*e6d6c189SCody Peter Mello if (ARGV[1]) print 1 10*e6d6c189SCody Peter Mello ARGV[1] = "" 11*e6d6c189SCody Peter Mello if (ARGV[2]) print 2 12*e6d6c189SCody Peter Mello ARGV[2] = "" 13*e6d6c189SCody Peter Mello if ("0") print "zero" 14*e6d6c189SCody Peter Mello if ("") print "null" 15*e6d6c189SCody Peter Mello if (0) print 0 16*e6d6c189SCody Peter Mello} 17*e6d6c189SCody Peter Mello{ 18*e6d6c189SCody Peter Mello if ($0) print $0 19*e6d6c189SCody Peter Mello if ($1) print $1 20*e6d6c189SCody Peter Mello}' 0 1 compare.in 21