#!/bin/bash IS_CYGWIN=false case $( uname -a | awk '{ print $1 }' ) in Darwin) # although this is deprecated, Mac still use it PERM="+111" ;; # Linux) ;& // Fall through does not support in OS X CYGWIN*) PERM="/111" IS_CYGWIN=true ;; *) PERM="/111" ;; esac function __func_head() { echo "Usage:" ${FUNCNAME[1]} $1 } function __func_help() { # echo "Usage:" ${FUNCNAME[1]} $1 echo " ${FUNCNAME[1]} $1" }