![]() ![]() There were also several open source implementations of sh called “ash”, most notably the Almquist shell, but they were very incomplete, lacking some POSIX features that people wanted to use. The only viable alternative was pdksh (“public domain Korn shell”), a free (now discontinued, but living on as mksh, which is actively developed), but I don't remember a Linux distribution using pdksh as /bin/sh, I don't know why, I guess because Linux distributions were always GNU/Linux distributions, basically shipping GNU versions of any tool for which a GNU version did exist. Most Linux distributions went for bash, a shell from the GNU project that tended to be between Bourne and Korn in terms of scripting features, and much better than either for interactive use). Neither the Bourne shell nor the Korn shell were open source until fairly recently, so when the Linux world started to form in the mid-1990s, they weren't available. Commercial Unix systems usually used ksh as the POSIX sh, but a few (e.g. Any system that called itself “Unix” had to implement at least these features. In 1992, POSIX codified a minimum set of sh features that was basically Bourne plus a few things. ![]() A few years later, the Korn shell came onto the scene, with a growing feature set many Unix variants installed it under the name ksh. The first release already had many of the features that are present in dash today, and subsequent versions introduced many more. In 1979, in Unix V7, the Thompson shell was replaced as /bin/sh by the Bourne shell. Conditionals and loops were provided via external programs if (which took one condition and one command as arguments) and goto (which worked by changing the file position of its parent in the script file). Later versions added features such as background execution with &, globbing (implemented with an external program), and some forms of quoting, but it didn't have variables or nested control structures. Version 1 had some of the features we know today, in particular redirection and pipes (read Dennis Ritchie's paper on early Unix history). Well, ok, there is: it's the Thompson shell. The short answer to “why the original sh shell isn't present in sh” is that there's no original sh.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |