diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-05 20:42:20 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-05 20:42:20 +1300 |
commit | 1ffb4b6811c3cff59b0acaed0e9e2aabe3291b3b (patch) | |
tree | 25245f00dce0e694c4b188d1a650a662ad496dec /bin/med.awk | |
parent | Slightly more idiomatic awk (diff) | |
download | dotfiles-1ffb4b6811c3cff59b0acaed0e9e2aabe3291b3b.tar.gz dotfiles-1ffb4b6811c3cff59b0acaed0e9e2aabe3291b3b.zip |
Use more portable awk stderr write
The fork is a bit ugly, but it's only for printing a single error.
Diffstat (limited to 'bin/med.awk')
-rw-r--r-- | bin/med.awk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/med.awk b/bin/med.awk index 8167f8dd..aee120cb 100644 --- a/bin/med.awk +++ b/bin/med.awk @@ -1,7 +1,7 @@ # Get the median of a list of numbers { vals[NR] = $1 } NR > 1 && vals[NR] < vals[NR-1] && !warn++ { - printf "med: Input not sorted!\n" > "/dev/stderr" + printf "med: Input not sorted!\n" | "cat >&2" } END { # Error out if we read no values at all |