export works on command line not in script

March 29, 2011 at 01:11:59
Specs: Solaris sun4u
I am in csh and when in check echo$SHELL it shows csh when i do something as export PATH the command works just fine , but when i use export in one of the script it gives error export:command not found. I tried changing the SHELL variable to bash but still the same error...
there is another solaris machine which also has default shell as csh there the script works just fine. What could be wrong?

See More: export works on command line not in script

Report •

March 29, 2011 at 09:57:16
You have not posted any code so it's difficult to say what the problem is. I don't mean to elaborate on the obvious, but if you don't have the shell invocation on the top line:


your script might not be recognized as a csh script.

Report •
Related Solutions

Ask Question