SyntaxFix
Write A Post
Hire A Developer
Questions
I found the shortest form to test the function output is simply
do_something() { [[ -e $1 ]] # e.g. test file exists } do_something "myfile.txt" || { echo "File doesn't exist!"; exit 1; }