Script that works for bash and tcsh at the same time
test "$?BASH_VERSION" != "0" || goto tcshcmd echo "running in bash" if [[ "$1" == "test" ]]; then echo "you have passed test as argument" fi return 0 tcshcmd: echo "running in tcsh" if ( "$1" == "test") then echo "you have passed test as argument" endif
July 30th, 2015 in
main entries