Typical #AWK command / utility template

```

#!/usr/bin/awk -f

BEGIN {

for ( i = 1; i < ARGC; i ++ ) {

if ( ARGV[i] ~ /^-/ ) {

if ( ARGV[i] ~ /^(-h)|(--help)$/ )

printf("option [%s]\n", ARGV[i]);

else

printf("unknown option [%s]\n", ARGV[i]);

}

else

printf("parameter [%s]\n", ARGV[i]);

}

}

```

Reply to this note

Please Login to reply.

Discussion

No replies yet.