SyntaxFix
Write A Post
Hire A Developer
Questions
Consider the case statement as well which is compatible with most sh-based shells:
case $str in /*) echo 1 ;; *) echo 0 ;; esac