summaryrefslogtreecommitdiff
path: root/err.awk
blob: 376cc6a790c06f762c030b231bdf3cf509012d1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/awk -f

# Usage
##############
# $ ./err.awk a
# $ echo $?
# $ ./err.awk 1
# $ echo $?

BEGIN {
  stderr = "/dev/stderr"
  if (ARGV[1] ~ /[A-Za-z]/) {
    print "Error:", "i don't understand it eng" > stderr
    exit -1
  }
}