Name
Name

Reputation: 1

How to execute sh shell script on different shellscsh/tcsh shell?

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

Answers (1)

pmikkelsen
pmikkelsen

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

Related Questions