Subject: | csh cannot be used for dotsh.pl |
If the current shell is csh, then dotsh.pl cannot be used and throws errors. This can look like
/bin/.: Permission denied.
(on linux)
.: Command not found.
(on freebsd).
The reason: sourcing a file with "." is not possible with csh. Anyway, csh does not cope with sh syntax at all.
Probably best is to remove csh from these lines:
$shell = "$1 -c" if ($_ =~ /^\#\!\s*(\S+(\/sh|\/ksh|\/zsh|\/csh))\s*$/);
and
if ($ENV{'SHELL'} =~ /\/sh$|\/ksh$|\/zsh$|\/bash$|\/csh$/) {
(It's probably also an oversight that bash is missing in the first line)