Unix/Linux Go Back    


UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

PS1 directory path not refreshing...

UNIX for Dummies Questions & Answers


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

 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 09:05 AM.. Reason: Code tags
Sponsored Links
    #2  
Old Unix and Linux 01-15-2013
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 7 December 2016, 12:24 PM EST
Location: Zürich
Posts: 8,598
Thanks: 343
Thanked 1,093 Times in 949 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 Unix and Linux 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.Linux
Sponsored Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 11: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 02:46 AM
refreshing page clx Post Here to Contact Site Administrators and Moderators 1 01-07-2011 08:47 AM
Retrieve directory path from full file path through sh royzlife Shell Programming and Scripting 7 09-21-2010 09:28 AM
PS1 to show relitive path truma1 Shell Programming and Scripting 2 07-20-2005 07:10 AM



All times are GMT -4. The time now is 11:20 AM.