echo command
this is vinoth. what is the use of echo $? in redhat linux.pls explain it.
regards vinoth |
it returns the exit status of the most recent command run.
you should look up some beginner's books for Linux and shell scripting and read them. |
this sounds like homework
look at " man echo " or search google/linux http://www.google.com/linux |
Shell uses negative logic.
In general, $? equals 0 denotes the execution of previous command is successful. |
Quote:
|
Hi,
In addition to timmeke's reply: Not 0 doesn't necessarily mean the program ran unsuccessful. Example: Grep can return 1, that tells you grep did not find the pattern given. Which could be what you wanted.... Always look at the manual page/documentation to find out where these numbers stand for. |
All times are GMT -5. The time now is 08:10 PM. |