Bug 19517 - pdksh bug (worked with 6.2 and all versions before)
pdksh bug (worked with 6.2 and all versions before)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: pdksh (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-21 13:27 EDT by kumarsri
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-28 15:26:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Just source this file in pdksh or ksh using ". ps1" to see the bug with 7.0 (377 bytes, text/plain)
2000-10-21 13:30 EDT, kumarsri
no flags Details

  None (edit)
Description kumarsri 2000-10-21 13:27:07 EDT
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'"
# "
Comment 1 kumarsri 2000-10-21 13:30:07 EDT
Created attachment 4491 [details]
Just source this file in pdksh or ksh using ". ps1" to see the bug with 7.0
Comment 2 Trond Eivind Glomsrxd 2000-10-22 16:50:11 EDT
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.
Comment 3 kumarsri 2000-10-25 20:20:46 EDT
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!
Comment 4 Trond Eivind Glomsrxd 2000-10-26 10:39:27 EDT
OK, verified. Will look into it.
Comment 5 Trond Eivind Glomsrxd 2000-11-28 15:26:03 EST
The patch which causes this to fail, is the patch from the pdksh author which
fixes bug #10758 (a problem with "-x") Argh.
Comment 6 Trond Eivind Glomsrxd 2000-11-28 16:22:45 EST
Fixed, in pdksh-5.2.14-9 which should show up in Rawhide someday soon.

Note You need to log in before you can comment on or make changes to this bug.