[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] exit code and if
- Subject: [ale] exit code and if
- From: mhirsch at nubridges.com (Michael Hirsch)
- Date: 18 Jul 2002 10:42:15 -0400
On Thu, 2002-07-18 at 10:17, Zyman, Andy wrote:
> Hello ALE,
> as always simple question and looking for Your suggestions:
>
> cmd
> if [ $? -ne 0 ]; then <do smth> fi
>
> Is there a better way to this? I mean how i can get rid from this 2 lines
> and make one ?
You could do:
if ! cmd; then <do sth> ; fi
but I prefer your code.
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.