Ocean Color Forum - Not logged in
I have been running a csh script to produce L2 MODIS data.
For some reason, after upgrading SeaDAS I am not longer able to run it as a cron job.
I have tracked it down to be an enviromental problem.
Thus, trying to source the $SEADAS/config/seadas.env in my .cshrc whitout success.
When writing source $SEADAS/config/seadas.env, I get an error saying
export: command not found
How am I supposed to add this to my .cshrc file.
I've just found out my seadas.env is for bash.
Is there a way, other than re-installing, to change from bash to csh?
Yes, it sounds like when you created your seadas.env file you were running it from a bash shell. To change it, simply start up a c-shell with the "csh" command, and then re-run the seadas_setup script. That will create a new seadas.env file for you with c-shell commands in it.
Thank you for your reply.
I have tried to re-run the setup script. Still my seadas.env is in bash.
Okay, try running the "chsh" command. This is the change shell command. It will reset your login shell to csh when you specify "/bin/csh" at the prompt. Then logout and login. Then try re-running the seadas_setup script and let me know if that doesn't work.
Roger, if you do prefer your default shell to be bash you might be able to create a simple bash script that is called by cron. This bash script would then call your original csh script which I believe would inherit the seadas environment, e.g.:
You could also change your processing script to be a bash or sh script instead of a csh script.. this can be done by changing the 1st line from "#!/bin/csh" to "#!/bin/bash", and then changing the csh syntax within the script to bash or sh syntax.