Re: grep raises signal ERR

2008-05-14 Thread Mark J. Reed
Oh, you want to clean up tempfiles. If they're scratch files that should get deleted no matter what, why not use EXIT to clean them up? On 5/14/08, Mark J. Reed <[EMAIL PROTECTED]> wrote: > You seem to be confused. ERR is not a signal; it is a shell feature > designed to trap exactly the cir

Re: grep raises signal ERR

2008-05-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to David Arnstein on 5/14/2008 6:36 PM: | #!/bin/bash | trap "echo '' ; exit 1" ERR | grep -q -e 'foo' < /dev/null | | This indicates that grep has raised the signal ERR. There is no such thing as signal ERR. Rather, ERR is a special case

Re: grep raises signal ERR

2008-05-14 Thread Mark J. Reed
You seem to be confused. ERR is not a signal; it is a shell feature designed to trap exactly the circumstance you're seeing: some command exits with nonzero status. A nonzero exit status is an "error", which is what ERR traps. What do you *want* the "aborting" message to mean? On 5/14/08, D

grep raises signal ERR

2008-05-14 Thread David Arnstein
Is this a bug? The following three-line shell script prints out the string when executed. #!/bin/bash trap "echo '' ; exit 1" ERR grep -q -e 'foo' < /dev/null This indicates that grep has raised the signal ERR. It is inconvenient for me. I am attempting to clean up some scratch files w