Created
July 24, 2012 13:54
-
-
Save jperkin/3170015 to your computer and use it in GitHub Desktop.
ksh93 oddity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why does ksh93 behave differently to every other bourne-derived shell (and ksh88)? | |
Turning braceexpand off makes no difference. | |
# Solaris 9 bourne shell | |
$ sh -c 'set -- "foo={one,two}"; echo $1' | |
foo={one,two} | |
# dash from Ubuntu | |
$ dash -c 'set -- "foo={one,two}"; echo $1' | |
foo={one,two} | |
# bash 3.2.48(1)-release | |
$ bash -c 'set -- "foo={one,two}"; echo $1' | |
foo={one,two} | |
# zsh 4.3.11 | |
$ zsh -c 'set -- "foo={one,two}"; echo $1' | |
foo={one,two} | |
# PD KSH v5.2.14 | |
$ ksh -c 'set -- "foo={one,two}"; echo $1' | |
foo={one,two} | |
# Solaris 9 /bin/ksh (M-11/16/88i) | |
$ ksh -c 'set -- "foo={one,two}"; echo $1' | |
foo={one,two} | |
# ksh 1993-12-28 s+ | |
$ ksh -c 'set -- "foo={one,two}"; echo $1' | |
foo=one foo=two | |
# ksh 93t+ 2010-03-05 | |
$ ksh -c 'set -- "foo={one,two}"; echo $1' | |
foo=one foo=two |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment