Post by CS 241 TutorPost by Vlado JokicHi,
I guess the easy way to do this would be to ask somebody who runs bash who
already has this setup. I'd use mine from home, but I think there would be
many inconsistencies. Anyone out there who's got this setup already where
it works (and they're 100% sure of it) that wouldn't mind sending it over
to me or the rest of the people on the newsgroup?
Thanks,
Vlado
Post by CS 241 TutorPost by Vlado JokicHi,
I've used bash just as the default Linux shell since I can remmeber, so
I'm not too affraid of the shell change. What bugs me is the course
related warning you gave. I'm assuming some things are csh specific (like
that one question in assignment 0 which requires the setup of the working
environment in .cshrc) and some are configured to work along with it, so
I'm wondering what sort of bad things we can run into by not using csh?
I'm just asking here so that everyone can read it here (unless there's
just a LOT of reasons to list where a conversation would work better)
rather than bugging you guys about it over and over (and so we have
somewhere to refer back to later on) ;)
Thanks,
Vlado
Post by CS 241 TutorIf you want some useful things like command history (press up/down arrow
chsh $USER /xhbin/tcsh
to switch to tcsh instead of csh. It will take effect after a short
amount of time(such as 5 minutes or so).
If you want to use bash, the path for it is /xhbin/bash, however i only
suggest using this if you're an advanced UNIX/Linux user. Even if you
think you're the most advanced it gets, please talk to us if you're
planning on changing to bash. There are some important course-related
things you'll need to do that you won't know about in your startup scripts.
--
CS 241 Tutors
Wes Ahrens, Adam Drenth
You have to do a similar thing as in A0 but in your .bash_profile or
.bashrc or .profile (whatever you're using) you must put the
source ~isg/pub/bin/cs-setup.bash
and you need to convert some of the lines in the .cshrc to your bash
configuration(such as PATH lines). You may also want to export some of
the variables that the .cshrc file sets.
If you have any problems let us know.
--
CS 241 Tutors
Wes Ahrens, Adam Drenth
Here's a basic bash profile that has all the necessities and a decent
prompt. Use this as your .bash_profile or .profile but not both.
#!/xhbin/bash
#
# Set command search rules
#
export PATH; PATH=`/bin/showpath gnu usedby=user standard `
#
# Find out what kind of terminal we are using
#
eval `setterm sytek:kd404 default:vc404`
#
# Set terminal-type dependent options (e.g. sysline or prompt string)
#
HOMEHOST="<hostname>"
HOMEUSER="<userid>"
export HOMEHOST HOMEUSER
PS1="`\setprompt`"
#
# Now do the usual signing on things
#
export MAIL; MAIL=${MAIL-"/usr/spool/mail/$USER"}
#if [ -r /software/.admin/bins/bin/read_system_news ] ; then
/software/.admin/bins/bin/read_system_news ; fi
# ENVIRONMENT VARIABLES
# Set default editor to use
export EDITOR=vim
# Set pager to use
export PAGER="less"
# Source the cs-setup for bash
source ~isg/pub/bin/cs-setup.bash
# Set prompt
case $TERM in
xterm*)
TERM="xterm"
;;
*)
;;
esac
export PS1 TERM
# Set ALIASES in .aliases file
if [ -s $HOME/.aliases ]; then
. $HOME/.aliases
fi
Sorry... you should use this instead... there was a problem with the
previous one.
.bash_profile:
#!/xhbin/bash
#
# Set command search rules
#
export PATH; PATH=`/bin/showpath usedby=user standard `
#
# Find out what kind of terminal we are using
#
eval `setterm sytek:kd404 default:vc404`
#
# Set terminal-type dependent options (e.g. sysline or prompt string)
#
HOMEHOST="<hostname>"
HOMEUSER="<userid>"
export HOMEHOST HOMEUSER
PS1="`\setprompt`"
#
# Now do the usual signing on things
#
export MAIL; MAIL=${MAIL-"/usr/spool/mail/$USER"}
if [ -r /software/.admin/bins/bin/read_system_news ] ; then
/software/.admin/bins/bin/read_system_news ; fi
# ENVIRONMENT VARIABLES
# Set default editor to use
export EDITOR=vim
# Set pager to use
export PAGER="less"
# Source the cs-setup for bash
source ~isg/pub/bin/cs-setup.bash
# Set prompt
PS1="\u@\h:\w$ "
# If this is an xterm set the TERM variable
case $TERM in
xterm*)
TERM="xterm"
;;
*)
;;
esac
export PS1 TERM
# Set ALIASES in .aliases file
if [ -s $HOME/.aliases ]; then
. $HOME/.aliases
fi
--
CS 241 Tutors
Wes Ahrens, Adam Drenth
***@student.cs.uwaterloo.ca