2 Matching Annotations
- Mar 2024
-
stackoverflow.com stackoverflow.com
-
The function body can be any compound command, not just a group command ( {} ). Use a sub-shell: is_hello_world() ( shopt -s nocasematch [[ "$1" =~ "hello world" ]] )
-
foo () {...} just looks so natural, you never think that the braces aren't part of the function syntax, rather than the mostly commonly used compound command.
-