Command for status of last command
|
Original Message
|
Name: abhisri2k8
Date: August 4, 2008 at 00:03:38 Pacific
Subject: Command for status of last commandOS: unixCPU/Ram: pivModel/Manufacturer: pentium |
Comment: How to know the status of last command executed in unix exactly..... What is the command for that
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: nails
Date: August 4, 2008 at 07:28:24 Pacific
Subject: Command for status of last command |
Reply: (edit)Look at the shell's exist code; if the last command was successful, the exit code is zero, else it is non-zero: who > /dev/null echo $? 0 xwho ksh: xwho: not found echo $? 127
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: