Tcsh does not work after upgrade from 31 to 33 (A c-shell script working in Fedora 31 does not work in 33, 34)


After upgrading Fedora 33 from 31, I cannot enter csh or tcsh.
I can only use bash shell, but any c-shell script cannot be compiled (csh -f a script).

The error message is as follow,
Division by 0.

Now I upgrade 34 but the problem is not solved.
I removed tcsh and reinstall but the broblem is not solved.

How can I solve it ?

Many thanks,

1 Like

Can you post an example script which shows the problem? Does the problem occur if you create a new account with default dot files and run a minimal test there?


you can install tcsh and easily change shell

also run “chsh” command and will be use tcsh shell.

[root@nalkal simmon]# chsh 
Changing shell for root.
New shell [/bin/bash]: /bin/tcsh
Shell changed.
[root@nalkal simmon]# exit
[simmon@nalkal ~]$ su
[simmon@nalkal simmon]# echo $shell

reboot or relogin…will be use tcsh shell !

Have a nice day!

1 Like

Dear Matthew Miller,

Thank you for the comment.
With the existing account and root,

[ihjo@localholt ~] tcsh
Division by 0.

[root@localholt ~] tcsh
Division by 0.

But with a new account by useradd -m -s /bin/tcsh ihcho
It seems to be working, but there’s no .tcshrc file on the home directory.

I will try to source a scrip in the old .tcshrc line by line.

Thank you for the comment.

Dear Great Peoples OS,

I did it several times.
The error message was “Division by 0.”.

Thank you for the comment.

The following script gives “Division by 0.”.
In Fedora 31, there was no problem.

######### set default top level for ALL SSW (top=SSW_XXX) ####################
set upall=($upallinstr)
set lowall=($SSW_INSTR_ALL)

while ($#upall >= 1)
set inname=$upall[1]:t
set inpath="/"$lowall[1]:t
set mission="/"$lowall[1]:h
if ($mission == $inpath) then
set mission=""
eval setenv “SSW_$inname” “$SSW$mission$inpath”
shift lowall
shift upall

What are you talking about?

1 Like


You can safely rename/remove that file.
You don’t really need it to use the shell.

1 Like

I commented above three lines.
Now it is working well.
Thank you for your helpful comments.

What does this shell script have to do with the behavior and use of the tcsh shell?

I don’t know well.
But they give the message “Division by 0.” which did not appear in Fedora 31.