zsh-workers
 help / color / mirror / code / Atom feed
* zsh-ksh-Incompatibility
@ 2004-09-02 13:46 Dieter Lambrecht
  2004-09-02 13:56 ` zsh-ksh-Incompatibility Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Dieter Lambrecht @ 2004-09-02 13:46 UTC (permalink / raw)
  To: zsh-workers

Hi,

there is an incompatility between Korn-Shell and zsh with emulate ksh:


A real korn shell script ( e.g. Version M-11/16/88f or Version M-12/28/93e on AIX,   Version M-11/16/88i on Solaris)

      #! /bin/ksh

      u=bzq090
      echo ~$u

gives output

      /home/bzq090


whereas the same script for zsh in ksh-emulation
      #! /bin/zsh
      emulate ksh

      u=bzq090
      echo ~$u

produces

      ~bzq090.



An old ksh-book (describes versions ksh88d and ksh88e) exactly predicts "~bzq090". However, I could not find any actual ksh that produces this result.


Kind Regards,

Dieter Lambrecht.


--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: zsh-ksh-Incompatibility
  2004-09-02 13:46 zsh-ksh-Incompatibility Dieter Lambrecht
@ 2004-09-02 13:56 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2004-09-02 13:56 UTC (permalink / raw)
  To: zsh-workers


"Dieter Lambrecht" wrote:
> Hi,
> 
> there is an incompatility between Korn-Shell and zsh with emulate ksh:
> 
> 
> A real korn shell script ( e.g. Version M-11/16/88f or Version M-12/28/=
> 93e on AIX,   Version M-11/16/88i on Solaris)
> 
>       #! /bin/ksh
> 
>       u=3Dbzq090
>       echo ~$u
> 
> gives output
> 
>       /home/bzq090
> 
> 
> whereas the same script for zsh in ksh-emulation
>       #! /bin/zsh
>       emulate ksh
> 
>       u=3Dbzq090
>       echo ~$u
> 
> produces
> 
>       ~bzq090.

That's strange, because the shell was altered specifically to do this in
ksh (and more generally, Bourne shell) emulation.  Possibly it's needed
in sh emulation only.

`unsetopt sh_file_expansion' will make it work.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-02 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-02 13:46 zsh-ksh-Incompatibility Dieter Lambrecht
2004-09-02 13:56 ` zsh-ksh-Incompatibility Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).