Closed nikhilbiyani closed 5 years ago
This might also be when csh is different than tcsh on platforms. We should replace csh with tcsh.
I can confirm that with csh-bsd this is indeed a problem. On many debian/ubuntu install I suspect that /bin/csh is set to /bin/bsd-csh and not tcsh.
Fixing this on debian/ubuntu can be done with
sudo update-alternatives --set csh /bin/tcsh
But maybe it's better if this is fixed in the focus scripts.
that worked on Ubuntu 17.10. thx @PaulVanSchayck for the workaround.
Hi,
We don't have to change csh to tcsh, which is better and safer. In modern Linux distros csh is just a link to tcsh. I updated the documentation to make it clearer: https://focus.c-cina.unibas.ch/wiki/doku.php?id=1_0:external-tools#t_csh
Sure tcsh is safer, but it's not the default on the most popular Linux distribution around. Using the wrong shell leads to rather cryptic error messages at rather random places. That these error messages have to be fixed by changing your shell is not obvious. This addition to the wiki will be overlooked.
I would recommend somehow implementing a check to the /bin/csh shell to check whether is in fact tcsh running.
Anyway, my two cents.
Thanks for your tip, Paul. Agree having a check would be good. Speaking for myself, I was surprised to find out that the "old school" csh is still lying around - I thought nowadays it was always tcsh disguised as csh.
On some platforms sourcing CSH files with arguments does not work. In these cases, the arguments have to be left out from the sourcing command and have to added to a variable argv before the sourcing command.
source ${proc_2dx}/a_script.com arg1 arg2
should be changed to