2012/11/7 Carsten Peter <[email protected]>:
> It's getting even stranger ...
>
> First, I definitly use MKSH as there's no other KSH version installed.
>
> I modified my example script as follows:
> ------------------------------------------------------------
> #! /bin/ksh
>
> echo "******************************"
> echo "${KSH_VERSION}"
> echo "${.sh.version}"
> echo "******************************"
>
> . ./include.src
>
> ./exitcode1.sh
>
> exit 0
> ------------------------------------------------------------
>
> After executing that my terminal session still works fine (I typed 'lsx' 
> after the script has finished to see what happens):
> ------------------------------------------------------------
> Running myscript.sh
> ******************************
> @(#)MIRBSD KSH R39 2009/08/01
> ./myscript.sh[7]: ${.sh.version}": bad substitution
> #
> # lsx
> -bash: lsx: command not found
> #
> #
> ------------------------------------------------------------
>
> (note that the second line of stars is not printed !)
>
> I the commented out the 'echo' lines showing the KSH version:
>
> ------------------------------------------------------------
> #! /bin/ksh
>
> echo "Running myscript.sh"
>
> #echo "******************************"
> #echo "${KSH_VERSION}"
> #echo "${.sh.version}"
> #echo "******************************"
>
> . ./include.src
>
> ./exitcode1.sh
>
> exit 0
> ------------------------------------------------------------
>
> Running this version of the script corrupts my terminal session again (again 
> I typed 'lsx' but you don't see what I enter, only the error message is 
> shown):
>
> ------------------------------------------------------------
> # ./myscript.sh
> Running myscript.sh
> # # -bash: lsx: command not found
>                                  # #
> ------------------------------------------------------------
>
> I installed the RPM from the Oracle Linux 6.1 ISO image named 
> mksh-39-5.el6.x86_64.rpm. I also tried to install a newer version of MKSH 
> today (mksh-40i-0.fc18.20120630.x86_64.rpm) but this requires new versions of 
> (at least) glic so I cancelled the installation as I don't want to screw up 
> anything. ;-)

R39 is ancient!
and mksh requires GCC/PCC/TinyCC/nwcc/SunPro compiler and a working
POSIX shell for compiling! why not compiling and overwrite `which
mksh` if needed?

>
> -------- Original-Nachricht --------
>> Datum: Wed, 7 Nov 2012 13:59:06 +0000 (UTC)
>> Von: Thorsten Glaser <[email protected]>
>> An: Carsten Peter <[email protected]>
>> CC: [email protected]
>> Betreff: Re: Really strange behaviour or even a bug in MKSH
>
>> Carsten Peter dixit:
>>
>> >After running myscript.ksh my shell console seems to be smashed. No
>> >carriage return seems to be done anymore when pressing the return key.
>> >Any characters entered on the shell prompt aren't shown anymore too.
>>
>> This doesnb> On the other hand, I do not have access to the exact
>> version of Horracle Linux, so if you could point me to
>> where I can get the RPM and possibly SRPM in questionb> also, #!/bin/ksh may 
>> call AT&T ksh93, not mksh, depending
>> on your distributionb>
>> Please echo $KSH_VERSION in the script, and possibly,
>> also ${.sh.version} (syntax error in mksh, works in ksh93).
>>
>> Thanks,
>> //mirabilos
>> --
>> 16:47b  B+mika:#grmlB; .oO(mira ist einfach gut....)
>> 23:22b  B+mikap:#grmlB;
>> mirabilos: und dein bootloader ist geil :)    23:29b  B+mikap:#grmlB; und
>> ich
>> finds saugeil dass ich ein bsd zum booten mit grml hab, das muss ich dann
>> gleich mal auf usb-stick installieren -- Michael Prokop C<ber MirOS
>> bsd4grml

Reply via email to