![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting current work directory in Command Prompt | MeganP | UNIX for Dummies Questions & Answers | 3 | 07-20-2007 10:49 AM |
| Adding # minutes to current time... | gptavares | UNIX for Advanced & Expert Users | 7 | 06-25-2007 12:10 PM |
| Setting the current path in the command prompt in (t)csh | reborg | Answers to Frequently Asked Questions | 0 | 10-10-2006 12:02 PM |
| Substituting variable with current time | jhansrod | Shell Programming and Scripting | 4 | 11-20-2005 04:20 PM |
| current directory as part of the csh prompt | jamesloh | Shell Programming and Scripting | 3 | 08-27-2002 10:38 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Help setting PS1 prompt to include current time
Hi,
I'm using the ksh shell and I'd like to set my PS1 prompt on an AIX system to include, amongst ther things, the current time. This was my best effort: export PS1=$(date -u +%R)'${ME}:${PWD}# ' but this only sets the time to the value when PS1 is defined and the time value doesn't actually change after that. Any one got any ideas how to achieve this? I've tried searching the forum but can't find anything. Thanks Gareth |
| Forum Sponsor | ||
|
|
|
|||
|
PWD, RANDOM and some other environment variables are defined by the shell to point to a function. I don't know of a function defined as a shell symbol that returns date & time.
In the korn shell try: Code:
PS1='$RANDOM' |