Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Prompt Question

 
   Linux (Home) -> Red Hat General RSS
Next:  linux page cache - direct io  
Author Message
Jerry Criswell

External


Since: Aug 28, 2005
Posts: 17



(Msg. 1) Posted: Mon Sep 12, 2005 9:44 pm
Post subject: Prompt Question
Archived from groups: linux>redhat (more info?)

In the process of learning, I am attempting to change my terminal
prompt. According to both my book (Red Hat Fedora and Enterprise Linux
4 Bible) and "man bash", \$ is supposed to show # or $ depending on who
you are. This isn't working. The line in my .bashrc file is:

export PS1-"[\t \w ] \$ "

What am I missing? Need anything else?

JC
Back to top
Login to vote
ynotssor

External


Since: Apr 13, 2005
Posts: 135



(Msg. 2) Posted: Mon Sep 12, 2005 9:44 pm
Post subject: Re: Prompt Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Jerry Criswell" <criswel RemoveThis @mchsi.com> wrote in message
news:ZEmVe.326194$_o.72367@attbi_s71

> In the process of learning, I am attempting to change my terminal
> prompt. According to both my book (Red Hat Fedora and Enterprise
> Linux 4 Bible) and "man bash", \$ is supposed to show # or $
> depending on who you are. This isn't working. The line in my
> .bashrc file is:
>
> export PS1-"[\t \w ] \$ "
>
> What am I missing? Need anything else?

export PROMPT_COMMAND='PS1="[\t \w ] \$ "'
Back to top
Login to vote
Jerry Criswell

External


Since: Aug 28, 2005
Posts: 17



(Msg. 3) Posted: Tue Sep 13, 2005 3:32 am
Post subject: Re: Prompt Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ynotssor wrote:
> "Jerry Criswell" <criswel.RemoveThis@mchsi.com> wrote in message
> news:ZEmVe.326194$_o.72367@attbi_s71
>
>
>>In the process of learning, I am attempting to change my terminal
>>prompt. According to both my book (Red Hat Fedora and Enterprise
>>Linux 4 Bible) and "man bash", \$ is supposed to show # or $
>>depending on who you are. This isn't working. The line in my
>>.bashrc file is:
>>
>>export PS1-"[\t \w ] \$ "
>>
>>What am I missing? Need anything else?
>
>
> export PROMPT_COMMAND='PS1="[\t \w ] \$ "'

That did it. Thanks a lot!

JC

PS: The missing = in the original message was a typo.
Back to top
Login to vote
Zdenek Zikan

External


Since: Sep 13, 2005
Posts: 9



(Msg. 4) Posted: Tue Sep 13, 2005 9:02 am
Post subject: Re: Prompt Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jerry Criswell wrote:
> In the process of learning, I am attempting to change my terminal
> prompt. According to both my book (Red Hat Fedora and Enterprise Linux
> 4 Bible) and "man bash", \$ is supposed to show # or $ depending on who
> you are. This isn't working. The line in my .bashrc file is:
>
> export PS1-"[\t \w ] \$ "
>
> What am I missing? Need anything else?

The right version is:
export PS1='[\t \w ] \$ '

There were two problems:
1) minus instead of equal sign (I think, it was a typo)
2) quotation marks instead of apostrophes
If you use quotation marks, bash expands \$ to $ (because it thinks, you
escape $)
Example:
[10:57:53 ~ ] $ export PS1="[\t \w ] \$ "
[11:00:38 ~ ] $ echo $PS1
[\t \w ] $
[11:00:41 ~ ] $ export PS1='[\t \w ] \$ '
[11:00:49 ~ ] $ echo $PS1
[\t \w ] \$
[11:00:59 ~ ] $

I hope it's clear.

Bye, Zdenek Zikan
Back to top
Login to vote
Display posts from previous:   
Related Topics:
question - is there anyway i can read my ie email in redhat? greg

Newbie question... - Hi! I am new to Linux, but have decided to use Fedora. I have a lot of folders and files saved on CD (*.avi, *.mpg and *.mp3 etc) and wonder if I will be able to see and use them when I have installed Linux? I also have a lot of stuff on my second..

Distro question - Hi! Just wanted to see if anyone had any thoughts on offshoot RedHat distros. I'm looking to build a small server network, and want to make sure that it can be kept updated in the future. CentOS looks like a good RHEL4 clone, but I'd be concerned..

repomd question - Suddenly both my linux servers are giving me this message after attempting up2date: "up2date Unable to import repomd support so repomd support will not be available" 1 server appears to have updated no packages and the other a few. Can anyon...

vsftpd question - Hi This is about the vsftpd server. When I connect as a local user, then uploaded files are unexpectedly owned by group "users" not the original group of the local user. How can I fix this? Many thanks Bernard
       Linux (Home) -> Red Hat General All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact