help-bash
[Top][All Lists]
Advanced

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

Is there a way to capture all the exit status in an assignment?


From: Peng Yu
Subject: Is there a way to capture all the exit status in an assignment?
Date: Sun, 26 Apr 2020 09:45:18 -0500

I'd like to capture all the exit status in an assignment like the
following. It seems that something similar PIPESTATUS should be
defined for this to work. Is it possible? Thanks.

$ x=$(false)a$(true)b
$ echo $?
0
$ x=$(true)a$(false)b
$ echo $?
1

-- 
Regards,
Peng



reply via email to

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