Tagged Questions
3
votes
1answer
118 views
Testing equivalence for exit status
Are the following two command lists portably equivalent?
$foo; echo $? #(1)
and
$foo && echo 0 || echo $? #(2)
Postscript
Consider the command exit-status defined so:
#!/bin/sh
exit ...