bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request


From: Eric Blake
Subject: Re: feature request
Date: Sat, 03 Jun 2006 14:39:59 -0600
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please keep replies on the list, so that others may help with suggestions.

According to A P Garcia on 6/1/2006 12:54 PM:
> On 6/1/06, Eric Blake <ebb9@byu.net> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> According to A P Garcia on 5/31/2006 3:49 PM:
>> >
>> > Bash Version: 2.05b
>> > Patch Level: 0
>>
>> You may want to consider upgrading; bash is at 3.1 patch level 17.
> 
> I'm just using the version that comes with Debian stable (notorious
> for being outdated).
> 
> 
>> > Description:
>> > It would be very useful to have a shell option that displays the exit
>> > code of each command when it terminates.
>>
>> Bash already has this, in the prompt.  For example, I use:
>>
>> PS1='${PIPESTATUS[*]}\$ '
>>
>> At which point I see the exit status of every command in the previous
>> pipeline.
> 
> Thanks. That's a nice trick, but it doesn't work for scripts. The
> feature would
> facilitate script debugging (bash -x foo) and logging. Both printing
> $? after every command in a script and trying a DEBUG trap are ugly
> kludges.
> 

What's wrong with a DEBUG trap?

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEgfOf84KuGfSFAYARAoBuAJ9ov4nQxRr+kXEXbyldO9zrLBeltgCgnmin
CKeGwSULBawXwO1zyKbvpkE=
=EgG9
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]