Operating System - HP-UX
1753886 Members
7647 Online
108809 Solutions
New Discussion юеВ

Re: PROBLEM WITH PROMPT AND HOUR

 
SOLVED
Go to solution
Muthukumar_5
Honored Contributor

Re: PROBLEM WITH PROMPT AND HOUR

PS1 varialble can show date, user, hostname and pwd. These details are static to that moment. Time will be variable.

$PWD will be update when directory is navigated. So that it will be replicated in prompt.

If you export it with date command, it will keep static data of time. I think there may be a change to have this in bash PS1.

check this out,
http://www.nersc.no/~knutal/unix_tips.html
Easy to suggest when don't know about the problem!
CAS_2
Valued Contributor
Solution

Re: PROBLEM WITH PROMPT AND HOUR

Bernardo, try the following:

set +u

I don't know the internals of this shell flag.

In my box:

["${_d[_s]}$_x1:$_x2:$_x3"]> set +u
[14:03:47]>

I remember there are 'set +u' and 'set -u' in the root's .profile.
gaudiobe
Advisor

Re: PROBLEM WITH PROMPT AND HOUR

Great CAS!!!
BINGO!!!
set +u works fine!

Thanks to all.
Bernardo