Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- seeOutput=`return`
- echo $seeOutput
- -bash: return: can only `return' from a function or sourced script
- false ; echo $?
- true ; echo $?
- 1
- 0
- f()
- {
- ls $AAA
- return $?
- }
- g()
- {
- f
- return $?
- }
- d()
- {
- g
- echo $?
- }
- AAA=
- d
- <contents of dir>
- 0
- AAA=sdsasdasd
- d
- ls: sdsasdasd: No such file or directory
- 2
Add Comment
Please, Sign In to add comment