Re: Hostname in shell (bash)?
I personally like the following one (because no matter where you are, it will show you the working directory as well as who is logged in). Put this into .bashrc... PS1="[EMAIL PROTECTED]:\w> " export PS1 regards, Robert ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hostname in shell (bash)?
Try: PS1=`id [EMAIL PROTECTED] -s`"$ " I put that into the .bashrc file. - Original Message - From: "Steven N. Fettig" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 27, 2004 8:01 AM Subject: Hostname in shell (bash)? > Hi all, > > I searched the archives and documents on bash, but I can't figure out > how to put the hostname of the workstation I am on before the $ of the > shell/command line. Does anyone know how to add the hostname > (preferably the first part - i.e. www, db1, etc) to the command line for > bash 2.x? > > Thanks, > Steve > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: Hostname in shell (bash)?
> Hi all, > > I searched the archives and documents on bash, but I can't figure out > how to put the hostname of the workstation I am on before the > $ of the > shell/command line. Does anyone know how to add the hostname > (preferably the first part - i.e. www, db1, etc) to the > command line for > bash 2.x? I have this in my .bashrc and .bash_profile files (\h is hostname): # set prompt PS1="===[\h][\u] \w # " PS2=">" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"