diff options
author | haturatu <taro@eyes4you.org> | 2025-01-03 14:36:01 +0900 |
---|---|---|
committer | haturatu <taro@eyes4you.org> | 2025-01-03 14:36:01 +0900 |
commit | 250826e7141542fc92c66fe482bb140a26951b89 (patch) | |
tree | 8a429e7ceabae53e93a60458a5b0a89d223754b4 /err.awk |
first commit
Diffstat (limited to 'err.awk')
-rwxr-xr-x | err.awk | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,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 eng" >> stderr + exit -1 + } +} |