Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. test(){
  4. return 1;
  5. }
  6.  
  7. VAR=$(expect -c 'puts "Exiting"; exit 1;');
  8. echo "$VAR";
  9. RETURN_CODE=$?;
  10. echo $RETURN_CODE;
  11.  
  12. test
  13. RETURN_CODE=$?;
  14. echo $RETURN_CODE;
  15.  
  16. Exiting
  17. 0
  18. 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement