Bug 19517 - pdksh bug (worked with 6.2 and all versions before)
Summary: pdksh bug (worked with 6.2 and all versions before)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pdksh
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-21 17:27 UTC by kumarsri
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-11-28 20:26:37 UTC
Embargoed:


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 17:30 UTC, kumarsri
no flags Details

Description kumarsri 2000-10-21 17:27:07 UTC
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 17:30:07 UTC
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 20:50:11 UTC
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-26 00:20:46 UTC
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 14:39:27 UTC
OK, verified. Will look into it.

Comment 5 Trond Eivind Glomsrxd 2000-11-28 20:26:03 UTC
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 21:22:45 UTC
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.