The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to enter if-then condition on command prompt/line ? mpc8250 Shell Programming and Scripting 3 02-10-2008 08:27 AM
prompt line sobnc AIX 0 01-19-2008 01:50 PM
Help-prompt for path and take this as input in find command bsandeep_80 UNIX for Advanced & Expert Users 6 01-03-2008 03:16 AM
Setting the current path in the command prompt in (t)csh reborg Answers to Frequently Asked Questions 0 10-10-2006 12:02 PM
2 line prompt Kelam_Magnus UNIX for Dummies Questions & Answers 7 06-13-2002 07:23 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-02-2007
Registered User
 

Join Date: Apr 2007
Posts: 2
Path in prompt line?

Can anyone tell me what makes the current path appear in the prompt ?

thx
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-02-2007
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,663
This works for me on sh

Code:
export PS1="[\w] "
Reply With Quote
  #3 (permalink)  
Old 04-02-2007
Registered User
 

Join Date: Apr 2007
Posts: 2
no, doesnt work for me ...

I get something like this:

migserv2:/appl/users/migesr> bash
bash-2.05b$
Reply With Quote
  #4 (permalink)  
Old 04-02-2007
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,576
it works !!!

you need to export the PS1 variable in the new shell

else export the PS1 variable in to the bash profile
Reply With Quote
  #5 (permalink)  
Old 04-02-2007
Registered User
 

Join Date: Jan 2007
Posts: 366
For Bash Shell:

Code:
PS1='\u@\h:\w\$ '
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:44 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0