[CentOS] Getting the return value of the last command run
Dotan Cohen
dotancohen at gmail.comMon May 30 14:38:56 UTC 2011
- Previous message: [CentOS] Where is the Centos Linux 5.5 kernel syscall handler for mmap? (Keith Roberts)
- Next message: [CentOS] Getting the return value of the last command run
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
All commands return a value, usually 0 if run properly. For instance, try: $ ls && echo "done" $ lsd && echo "done" The echo command is only executed if the ls command exited successfully. If one did not add the echo command with the && after a command, how can he determine if the command exited successfully? I have a particularly troubling script that gives does not mention if it exits successfully or not. I could modify it (and probably will some day) but in general I'd like to know the answer to this question as a learning experience. Thanks. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com
- Previous message: [CentOS] Where is the Centos Linux 5.5 kernel syscall handler for mmap? (Keith Roberts)
- Next message: [CentOS] Getting the return value of the last command run
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list