[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GAWK] Exit status, --lint
From: |
Denis M. Wilson |
Subject: |
[GAWK] Exit status, --lint |
Date: |
Thu, 24 Sep 2009 14:56:26 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
The exit status of gawk is undocumented, when
gawk exits other than via an exit statement.
E.g. when an error occurs using --lint=fatal.
In that case the exit status is 2 and not
EXIT_FAILURE (1 under glibc). Example:
#!/bin/sh
awk --lint=fatal -f - <<'ENDAWK'
BEGIN {
print zzz
}
ENDAWK
echo $?
output:
awk: -:2: fatal: reference to uninitialized variable `zzz'
2
I am using Ubuntu 8.4
Denis M. Wilson
- [GAWK] Exit status, --lint,
Denis M. Wilson <=