Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-ksh-Incompatibility



"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@xxxxxxx>                  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
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author