Next revision | Previous revisionLast revisionBoth sides next revision |
ultimate_differences_amongst_unix_shells [2021/03/09 23:37] – created hc9 | ultimate_differences_amongst_unix_shells [2021/03/12 18:39] – [Conclusion] hc9 |
---|
An enhanced port of the Thompson shell is available on SDF as ''`/usr/pkg/bin/osh'''. You can read its manual by doing a ''`man osh''' at the command prompt. You can also read its manual [[http://v6shell.org/man/osh.1.html|online]] if you prefer to do so. | An enhanced port of the Thompson shell is available on SDF as ''`/usr/pkg/bin/osh'''. You can read its manual by doing a ''`man osh''' at the command prompt. You can also read its manual [[http://v6shell.org/man/osh.1.html|online]] if you prefer to do so. |
| |
Ecl 1: | **Ecl 1:** |
| |
% setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH | % setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH |
/usr/pkg/bin:/usr/bin:/bin | /usr/pkg/bin:/usr/bin:/bin |
| |
Ecl 2: | **Ecl 2:** |
| |
% which osh if goto ^ ( tr '\n' ' ' ; echo ) ^ sed 's/.*/ls -l &/' ^ osh | % which osh if goto ^ ( tr '\n' ' ' ; echo ) ^ sed 's/.*/ls -l &/' ^ osh |
-r-xr-xr-x 1 root wheel 38216 Jul 18 21:37 /usr/pkg/bin/osh | -r-xr-xr-x 1 root wheel 38216 Jul 18 21:37 /usr/pkg/bin/osh |
| |
Ecl 3: | **Ecl 3:** |
| |
% if -r /netbsd echo /netbsd: Is readable ; \ | % if -r /netbsd echo /netbsd: Is readable ; \ |
A Bourne-shell workalike is available on SDF as ''`/bin/sh'''. You can read its manual by doing a ''`man sh''' at the command prompt. You can also read its manual [[http://netbsd.gw.com/cgi-bin/man-cgi?sh+1.alpha+NetBSD-2.1|online]] if you prefer to do so. | A Bourne-shell workalike is available on SDF as ''`/bin/sh'''. You can read its manual by doing a ''`man sh''' at the command prompt. You can also read its manual [[http://netbsd.gw.com/cgi-bin/man-cgi?sh+1.alpha+NetBSD-2.1|online]] if you prefer to do so. |
| |
Ecl 1: | **Ecl 1:** |
| |
$ PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH | $ PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH |
/usr/pkg/bin:/usr/bin:/bin | /usr/pkg/bin:/usr/bin:/bin |
| |
Ecl 2: | **Ecl 2:** |
| |
$ ls -l `which sh ksh bash` | $ ls -l `which sh ksh bash` |
-rwxr-xr-x 1 root wheel 963696 Jun 4 08:57 /usr/pkg/bin/bash | -rwxr-xr-x 1 root wheel 963696 Jun 4 08:57 /usr/pkg/bin/bash |
| |
Ecl 3: | **Ecl 3:** |
| |
$ if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \ | $ if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \ |
The C shell is available on SDF as ''`/bin/csh'''. You can read its manual by doing a ''`man csh''' at the command prompt. You can also read its manual [[http://netbsd.gw.com/cgi-bin/man-cgi?csh+1.alpha+NetBSD-2.1|online]] if you prefer to do so. | The C shell is available on SDF as ''`/bin/csh'''. You can read its manual by doing a ''`man csh''' at the command prompt. You can also read its manual [[http://netbsd.gw.com/cgi-bin/man-cgi?csh+1.alpha+NetBSD-2.1|online]] if you prefer to do so. |
| |
Ecl 1: | **Ecl 1:** |
| |
% setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH | % setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH |
/usr/pkg/bin:/usr/bin:/bin | /usr/pkg/bin:/usr/bin:/bin |
| |
Ecl 2: | **Ecl 2:** |
| |
% ls -l `which csh tcsh zsh` | % ls -l `which csh tcsh zsh` |
-r-xr-xr-x 2 root wheel 6352 May 11 2007 /usr/pkg/bin/zsh | -r-xr-xr-x 2 root wheel 6352 May 11 2007 /usr/pkg/bin/zsh |
| |
Ecl 3: | **Ecl 3:** |
| |
% if (-r /netbsd) echo /netbsd: Is readable ; \ | % if (-r /netbsd) echo /netbsd: Is readable ; \ |
---- | ---- |
| |
UNIX® is a registered trademark of [[http://www.opengroup.org/tm-guidelines.htm|The Open Group]]. \\ \\ $Id: shells.html,v 1.1 2008/12/19 16:35:57 jwodder Exp $ | UNIX® is a registered trademark of [[http://www.opengroup.org/tm-guidelines.htm|The Open Group]]. \\ \\ $Id: shells.html,v 1.1 2008/12/19 16:35:57 jwodder Exp $ [[http://sdf.org/?tutorials/shells|Ultimate Differences Amongst UNIX® Shells]] - traditional link (using [[wp>Revision_Control_System|RCS]]) |
| |