Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- errormsg=$(sample.sh 2>&1)
- if [ $? -ne 0 ]
- then
- echo $?
- echo "Successful."
- else
- echo $?
- echo "Error."
- 0
- Successful
- errormsg=$(sample.sh 2>&1)
- echo $?
- if [ $? -ne 0 ]
- then
- echo $?
- echo "Successful."
- else
- echo $?
- echo "Error."
- 1
- 1
- Error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement