PS1 directory path not refreshing... | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


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 !!

PS1 directory path not refreshing...

UNIX for Dummies Questions & Answers


Tags
directory path not refreshing, ksh, prompt, ps1, solved

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-15-2013
mgpatil31 mgpatil31 is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 22 February 2013, 3:18 AM EST
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
[Solved] PS1 directory path not refreshing...

Hi,
I am using Unix, I have added below in the .profile to change my prompt value.

Code:
PS1=`logname`@`hostname`:$PWD#

The problem is, after changing the directory, path is not being refreshed. Is there anything wrong?

Thanks,
Milind

Last edited by Scott; 01-15-2013 at 08:05 AM.. Reason: Code tags
Sponsored Links
    #2  
Old 01-15-2013
Scott's Avatar
Scott Scott is online now Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 24 October 2014, 4:03 AM EDT
Location: Zürich
Posts: 8,484
Thanks: 332
Thanked 1,047 Times in 914 Posts
You need to put that in single quotes:


Code:
PS1='....'

LOGNAME and HOSTNAME are usually variables, so do you need to "execute" those commands?
The Following User Says Thank You to Scott For This Useful Post:
mgpatil31 (01-15-2013)
Sponsored Links
    #3  
Old 01-15-2013
mgpatil31 mgpatil31 is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 22 February 2013, 3:18 AM EST
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
Thanks Scott, it worked by adding single quotes just for PWD command and keeping rest same.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Add directory to a global PATH miltonrods UNIX for Dummies Questions & Answers 3 06-29-2012 10:38 AM
[Solved] Help needed to have changing value to the command prompt string variable PS1 royalibrahim UNIX for Dummies Questions & Answers 2 04-26-2012 01:46 AM
refreshing page clx Post Here to Contact Site Administrators and Moderators 1 01-07-2011 07:47 AM
Retrieve directory path from full file path through sh royzlife Shell Programming and Scripting 7 09-21-2010 08:28 AM
PS1 to show relitive path truma1 Shell Programming and Scripting 2 07-20-2005 06:10 AM



All times are GMT -4. The time now is 04:29 AM.