The following used to work before with the older versions of ksh bundled with 6.2 and earlier and now fails to work with REDHAT 7.0 Please fix ! Thanks /Kumar (put these lines into a file called ps1 and type ". ps1") typeset -u uname export _s unset _a unset _b unset _c id | IFS="()" read _a _b _c if test "$_b" = "" then _b=`id --user --name` fi uname="$_b @ $(uname -n)" typeset -RZ2 _x1 _x2 _x3 let SECONDS=$(date '+3600*%H+60*%M+%S') _s='(_x1=(SECONDS/3600)%24)==(_x2=(SECONDS/60)%60)==(_x3=SECONDS%60)' TIME='${_d[_s]}$_x1:$_x2:$_x3' PS1=${TIME}" ($uname) "'$PWD'" # "
Created attachment 4491 [details] Just source this file in pdksh or ksh using ". ps1" to see the bug with 7.0
It works for me... [teg@hoser teg]$ ksh $ echo $PATH /usr/kerberos/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/bin:/opt/bin:/usr/X11R6/bin:/opt/jdk/bin:/home/devel/teg/bin:/usr/X11R6/bin:/opt/jdk/bin $ . ps1 ksh: .: ps1: not found $ . ~/ps1 :: (TEG @ HOSER.DEVEL.REDHAT.COM) /home/devel/teg # As you can see, you need to use the full path since "." isn't in the path by default. When added, the filename is enough.
Please note - IT IS NOT FIXED! The problem is that the time does NOT show up! It shows up as :: even in your output above. But the time shows up with older version of pdksh!
OK, verified. Will look into it.
The patch which causes this to fail, is the patch from the pdksh author which fixes bug #10758 (a problem with "-x") Argh.
Fixed, in pdksh-5.2.14-9 which should show up in Rawhide someday soon.