Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # See: https://github.com/koalaman/shellcheck/wiki/SC2155
- func() { local var=$(ls foo); echo $?; }
- func # returns 0
- func() { local var; var=$(ls foo); echo $?; }
- func # returns 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement