|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
shell script: get return message
Hello,
How do you get the return message of a program in shell script? I know the way to get the return code of the program. eg. a_cmd if test $? -eq 0 ; then echo "success" else echo "failed" fi Thank you. |
|
#2
|
||||
|
||||
|
you could use `backticks` to execute something, and then >redirect the results into a variable within your script...
chris
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > shell script: get return message |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|