Reputation: 1
How do I execute a sh shell script on different shells like csh/tcsh shell? There will be different syntax for sh and csh or tcsh.? ex: variable assignment is different for some of shells like var=value in sh shell and set var=value in tcsh similarly case end stmt esac in sh and endsw in tcsh shell.
Upvotes: 0
Views: 845
Reputation: 46
Your system should have a /bin/sh, so you could just run your shell script like this: /bin/sh YourScript.sh
Note that you have to make sure your script is not using any csh/tcsh/bash/zsh specific features.
Upvotes: 1