Ocean Color Forum - Not logged in
By rogers
Date 2006-07-27 08:33
Hi!
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.
Thank you,
Roger
By rogers
Date 2006-07-27 09:51
Hi again!
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?
Thanks again,
Roger
By mark
Date 2006-07-27 12:11
Roger,
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.
Mark
By rogers
Date 2006-07-27 13:28
Mark,
Thank you for your reply.
I have tried to re-run the setup script. Still my seadas.env is in bash.
Roger
By mark
Date 2006-07-27 13:37
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.
Mark
By mike
Date 2006-07-27 13:56
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.:
#!/bin/bash
/home/roger/bin/processing_script.csh
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.