From owner-freebsd-questions@FreeBSD.ORG Wed May 18 21:51:07 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42B6E16A4CE for ; Wed, 18 May 2005 21:51:07 +0000 (GMT) Received: from smtp1.suscom.net (smtp1.suscom.net [64.78.119.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8CC743D45 for ; Wed, 18 May 2005 21:51:04 +0000 (GMT) (envelope-from gerard-seibert@suscom.net) Received: from localhost (smtp1 [127.0.0.1]) by smtp1.suscom.net (Postfix) with ESMTP id 5F8CDD82D2 for ; Wed, 18 May 2005 17:51:01 -0400 (EDT) Received: from smtp1.suscom.net ([127.0.0.1]) by localhost (smtp1 [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 01598-05 for ; Wed, 18 May 2005 17:50:59 -0400 (EDT) Received: from [192.168.0.2] (ip47.232.susc.suscom.net [216.45.232.47]) by smtp1.suscom.net (Postfix) with SMTP id 44B89D82B1 for ; Wed, 18 May 2005 17:50:57 -0400 (EDT) Date: Wed, 18 May 2005 17:51:03 -0400 From: Gerard Seibert To: freebsd-questions@freebsd.org Sender: Gerard@smtp1.suscom.net, Seibert@smtp1.suscom.net Message-Id: <20050518175043.D57A.GERARD-SEIBERT@suscom.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Mailer: Becky! ver. 2.21 [en] Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new .250 at suscom.net Subject: Re: Bash: Setting Prompt X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: gerard-seibert@suscom.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2005 21:51:07 -0000 =1EOn Wed, 18 May 2005 07:37:44 -0500 Jacob S wrote: $> $>On Wed, 18 May 2005 06:26:53 -0400 (Eastern Standard Time) $>Gerard Seibert wrote: $> $>> FreeBSD 5.4 and Bash 3.00.16(1) $>>=20 $>> I hope that this is the right place to post this. $>>=20 $>> I have the following in my '.bash_profile' file. $>> # $>> # Set the prompt to display the 'user@host' and the working=20 $>> # directory with a '#' for root and '$' for user. $>> # $>> PS1=3D"\u@\h \w " $>> case 'id -u' in $>> 0) PS1=3D"${PS1}# ";; $>> *) PS1=3D"${PS1}$ ";; $>> esac $>> # $>> # Keep the environment when using su to become root $>> # $>> alias su=3D'su -m' $>> # $>> It is suppose to set the prompt to display the 'user@host' and the $>> working directory with a '#' for root and '$' for user. Everything $>> works except for the '#' and '$' symbols. The '$' symbol is always $>> displayed. $>>=20 $>> I must be doing something really stupid, but I do not know what. I $>> hope that someone can assist me. $> $>Just a guess, as I haven't tested this, but try changing your case line $>to look like this: $> $>case `id -u` in (Note the backticks instead of apostrophes.) $> $>HTH, $>Jacob ********** Reply Separator ********** Wednesday, May 18, 2005 5:48:39 PM I was not aware that there was a difference. Thanks, I will give it a shot. Ciao