Search code examples
csh

Display the command that is being executed in cshell


I am using csh where i want to display the command that is being executed.

I can see find something like set -x placing at the beginning of the script. But it seems to only work for bash. In cshell i am getting following error.

set: Variable name must begin with a letter.
Failed

Is there any way to display the command the is being executed in cshell. Please help!


Solution

  • You can run your c-shell script using csh -v. This will display each line of the script before executing it. This is useful for debugging c-shell scripts.