The UNIX and Linux Forums  

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


UNIX Desktop for Dummies Questions & Answers Questions regarding GNOME, KDE, CDE, Open Office, etc go 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 a prompt a particular value??? grajesh_955 Shell Programming and Scripting 2 03-11-2008 04:44 AM
OK prompt hshapiro SUN Solaris 3 10-04-2007 04:39 PM
prompt within awk gefa Shell Programming and Scripting 7 03-08-2007 01:44 AM
CWD as Prompt petter_uk UNIX for Dummies Questions & Answers 1 09-25-2005 09:48 PM
set prompt in sh yls177 UNIX for Dummies Questions & Answers 14 03-25-2003 08:36 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-05-2002
inquirer
Guest
 

Posts: n/a
Unhappy set prompt in sun

using hpux in the startup script my prompt goes like this:

set prompt="${HOST}:`pwd` (\\!) ${USER}% "

where the sample output is:

server1:/home/myhome (100) usrname%

when i change directory my prompt automatically updates so that i know my present directory and the history number so i can backtrack my commands by issuing !n.

is this possible in sun? i tried to insert this in my .login in sun using this:

PS1="`hostname`:`pwd` (\\!) ${USER}% "

which resulted in:

server1:/home/myhome (!) usrname%

since ${HOST} did not work, i used `hostname` instead. but the history part did not appear and when i tried to change directory my prompt did not update.

please help me.

thanks,

Last edited by inquirer; 07-05-2002 at 05:30 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 07-08-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Suggest the following be added to your .cshrc

alias cd 'cd \!*;set prompt="[`hostname`]\\! :" '
Reply With Quote
  #3  
Old 07-10-2002
inquirer
Guest
 

Posts: n/a
many thanks!

thankyou very much for the suggesstion...

it worked out just fine.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:58 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 Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0