SUMMARY: ksh oddities with DUX4.0

From: Thomas.Meyer <meyert_at_dla-marbach.de>
Date: Wed, 12 Nov 1997 16:59:34 +0100

"long time ago", on MAR 12th, 97, I wrote:

We'd like to report a problem with Digital Unix 4.[0|0A|0B] and would like to
know if others have had similar experiences.

Sometimes ksh would behave very oddly, saying that /bin/pwd was not found, e.g.

myserv:/# cd mnt
sh[4]: /bin/pwd: not found
myserv:#

This was never seen during the time we had DUX3.X.Y! It can be solved, though,
by simply trying again and again :-(

Maybe it has sth. to do with the following ksh funtion (quite useful: the
current working directory, abbreviated when too long, in your prompt):

myserv:/# typeset -f
function xcd
{
    "cd" $*
    OLDPWD="$LOGPWD"
    LOGPWD="$PWD"
    PWD="`/bin/pwd`"
    if [ ${#PWD} -gt 32 ]
    then
       typeset -L15 PWDl=$PWD # Mitte des Pfades ausblenden
       typeset -R15 PWDr=$PWD
       PWD="${PWDl}..${PWDr}"
    fi
}
myserv:/#


Would be glad if it was a known bug...

Regards,

----------------------------------------------------------------

Finally, DEC support people found out that the problem lies in my function
writing the PWD variable, which is supposed to be a reserved one.

After I rewrote the function xcd the problem didn't appear any more:

function xcd
{
    "cd" $*
    OLDPWD="$LOGPWD"
    LOGPWD="`/bin/pwd`"
    XPWD="$LOGPWD"
    if [ ${#XPWD} -gt 32 ]
    then
       typeset -L15 PWDl=$XPWD # Mitte des Pfades ausblenden
       typeset -R15 PWDr=$XPWD
       XPWD="${PWDl}..${PWDr}"
    fi
}


It has to be mentioned that the problem never appeared under Digital UNIX 3.0 -
3.2G.



Regards,

        Thomas Meyer, EDV-Systemadministrator
          email: Thomas.Meyer_at_dla-marbach.de
          smail: Deutsches Literaturarchiv Marbach
                 Schillerhoehe 8-10
                 D-71672 Marbach
        Telefon: +49-7144-848-141
            Fax: ...-387
            WWW: http://www.dla-marbach.de
Received on Wed Nov 12 1997 - 17:25:08 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT