[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gawk: catching print|command failures?
From: |
Ian D. |
Subject: |
gawk: catching print|command failures? |
Date: |
7 Jul 2004 07:39:24 -0700 |
If you have a line like
print "hello" | "/bin/some/program/that/bombs"
then you get a broken pipe message and gawk exits. For example:
$ gawk '{print | "foo(bar)"}'
hey
sh: syntax error at line 1: `foo' unexpected
Broken Pipe
$
Is there a way to "catch" the error within gawk and continue running?
I don't want gawk to exit.
TIA,
Ian
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gawk: catching print|command failures?,
Ian D. <=