I work on linux console and need to work on csh prompt. However the default prompt is bash and I have to give the command csh to change the mode. The reason for switching the prompt is that there are some background files which run only in csh prompt.
Example:
-bash-4.1$ ade useview shkanodi_sqlplus_v1
bash: /usr/local/nde/setup/nderc.csh: line 44: syntax error near unexpected toke n `('
bash: /usr/local/nde/setup/nderc.csh: line 44: `foreach file (.ndeprodrc .ndevie wrc)'
bash: /etc/skel/cshrc-DEFAULT: line 20: syntax error: unexpected end of file
Explanation: In the above example the command ade useview shkanodi_sqlplus_v1
is not executed properly in bash prompt and I first have to give csh command and then run the command. I would like to bypass giving csh command.
1.Make sure you've got csh installed.
2.Learn the location of csh:
which csh
or
whereis csh
Below, I'll assume the location is /bin/bash.
a) If you have administrative rights, just run as root:
usermod -s /bin/csh YOUR_USERNAME
(replacing YOUR_USERNAME with your user name).
b) If you don't have adm. rights, you can still just run csh --login at login, by putting the below line at the end of your .profile (in your home directory) :
setenv SHELL /bin/bash
exec /bin/csh --login
Refrence : bash from csh
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.