Created
March 7, 2021 08:20
-
-
Save jirib/03bec20348aa730606a7088a797b2a21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ type foo | |
foo is a function | |
foo () | |
{ | |
echo "foo"; | |
echo "bar"; | |
echo "running" | |
} | |
$ status=$(foo) | |
$ echo ${status} | |
foo bar running | |
$ if [ "${status}" == "running" ]; then true ; else false ; fi ; echo $? | |
1 | |
$ if [[ "${status}" == "running" ]]; then true ; else false ; fi ; echo $? | |
1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment