Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

Agreeing with comment by @mark-plotnick@mark-plotnick, OP has to ensure that the script is run by csh, e.g., by adding the "hash-bang" line:

#!/bin/csh

or running the script using the appropriate program:

csh ./foo

As a general rule, if a script lacks this information it will be run using /bin/sh

Further reading:

Agreeing with comment by @mark-plotnick, OP has to ensure that the script is run by csh, e.g., by adding the "hash-bang" line:

#!/bin/csh

or running the script using the appropriate program:

csh ./foo

As a general rule, if a script lacks this information it will be run using /bin/sh

Further reading:

Agreeing with comment by @mark-plotnick, OP has to ensure that the script is run by csh, e.g., by adding the "hash-bang" line:

#!/bin/csh

or running the script using the appropriate program:

csh ./foo

As a general rule, if a script lacks this information it will be run using /bin/sh

Further reading:

Source Link
Thomas Dickey
  • 79.3k
  • 9
  • 189
  • 290

Agreeing with comment by @mark-plotnick, OP has to ensure that the script is run by csh, e.g., by adding the "hash-bang" line:

#!/bin/csh

or running the script using the appropriate program:

csh ./foo

As a general rule, if a script lacks this information it will be run using /bin/sh

Further reading: