I\'m writing a script in UNIX where I have to check whether the first character in a string is \"/\" and if it is, branch.
For example I have a string:
/
Consider the case statement as well which is compatible with most sh-based shells:
case $str in /*) echo 1 ;; *) echo 0 ;; esac