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


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

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-15-2013
Registered User
 
Join Date: Jan 2013
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
Location: Zürich
Posts: 6,866
Thanks: 212
Thanked 745 Times in 651 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
Registered User
 
Join Date: Jan 2013
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
Reply

Tags
directory path not refreshing, ksh, prompt, ps1

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
[Solved] 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 11:54 AM.