On 2014-10-08, at 04:29, carr...@nationwide.com wrote: > > Some things I encounter is when i have developers working in OMVS the > first thing they do is bring over their Linux or AIX scripts and they do > not work. They try to use ksh or bash and can't so immediately we get a > black eye for using such an old antiquated shell > Users who don't comply with standards shouldn't expect portability. I'll attach some "ls -lLi" output that shows that several UNIX-like systems use dash:
uname -a; ls -Lli `whence rexx regina` /bin/*sh | sort -nk 6,6 as an alias for /bin/sh. Dash is lightweight and POSIX-compliant with few extensions. This enforces that scripts that begin "#!/bin/sh" use dash, enforcing POSIX compliance. They also use dash as the interpreter for the system() function for reasons of performance. Ubuntu claims this significantly improves startup speed. On 2014-10-07, at 10:30, Mike Schwab wrote: > If Bash was added to the POSIX standard, they would have to support it. > No. It appears that having once qualified for UNIX branding, OMVS feels no need to comply with updates to the standard. Notable and annoying examples are the -L and -P options to cd and pwd, and that the default behavior of pwd is -P-like ratner than -L-like as POSIX requires. I hope not to see bash added to POSIX. Bash is bloatware; over twice as large as Rexx on most systems, and almost ten times as large as dash. Most installations of dash omit POSIX command line editing (it's an option), which I find annoying. But they expect dash not to be used as an interactive shell. I don't know how much command line editing would bloat dash. 502 $ uname -a; ls -Lli `whence rexx regina` /bin/*sh | sort -nk 6,6 Darwin PaulGilm.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 20905756 -rwxr-xr-x 1 root wheel 53560 Oct 2 2010 /usr/bin/regina 8011852 -rwxr-xr-x 2 root wheel 767200 Feb 10 2010 /bin/csh 8011852 -rwxr-xr-x 2 root wheel 767200 Feb 10 2010 /bin/tcsh 8046173 -rwxr-xr-x 1 root wheel 1346544 Feb 4 2010 /bin/bash 8046219 -r-xr-xr-x 1 root wheel 1346624 Feb 4 2010 /bin/sh 6662774 -rwxr-xr-x 1 root wheel 1597200 May 11 2009 /bin/zsh 20905758 -rwxr-xr-x 1 root wheel 1866360 Oct 2 2010 /usr/bin/rexx 6661547 -r-xr-xr-x 1 root wheel 2186880 May 18 2009 /bin/ksh 503 $ uname -a; ls -Lli `whence rexx regina` /bin/*sh | sort -nk 6,6 Linux Linux-Mac 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:45 UTC 2014 i686 i686 i686 GNU/Linux 135180 -rwxr-xr-x 1 root root 5436 Jun 30 2012 /usr/bin/regina 4909 -rwxr-xr-x 1 root root 112204 Feb 19 2014 /bin/dash 4909 -rwxr-xr-x 1 root root 112204 Feb 19 2014 /bin/sh 135165 -rwxr-xr-x 1 root root 403996 Jun 30 2012 /usr/bin/rexx 4824 -rwxr-xr-x 1 root root 986672 Sep 27 02:05 /bin/bash 4824 -rwxr-xr-x 1 root root 986672 Sep 27 02:05 /bin/rbash 50 -rwxr-xr-x 1 root root 1713424 Nov 14 2013 /bin/static-sh 507 $ uname -a; ls -Lli `whence rexx regina` /bin/*sh | sort -nk 6,6 Linux raspberrypi 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux 4765 -rwxr-xr-x 1 root root 5544 Jul 11 2012 /usr/bin/regina 434 -rwxr-xr-x 1 root root 88340 Mar 29 2012 /bin/dash 434 -rwxr-xr-x 1 root root 88340 Mar 29 2012 /bin/sh 4758 -rwxr-xr-x 1 root root 342620 Jul 11 2012 /usr/bin/rexx 14879 -rwxr-xr-x 1 root root 813992 Sep 25 14:55 /bin/bash 14879 -rwxr-xr-x 1 root root 813992 Sep 25 14:55 /bin/rbash 512 $ uname -a; ls -Lli `whence rexx regina` /bin/*sh | sort -nk 6,6 Linux linaro-alip 3.0.57+ #26 PREEMPT Sun Mar 3 09:44:37 EST 2013 armv7l armv7l armv7l GNU/Linux 2358 -rwxr-xr-x 1 root root 5512 Dec 1 2011 /usr/bin/regina 14 -rwxr-xr-x 1 root root 63484 Mar 29 2012 /bin/dash 14 -rwxr-xr-x 1 root root 63484 Mar 29 2012 /bin/sh 276 -rwxr-xr-x 1 root root 77592 Dec 1 2011 /bin/posh 2221 -rwxr-xr-x 1 root root 252464 Dec 1 2011 /usr/bin/rexx 1767 -rwxr-xr-x 1 root root 605140 Sep 27 02:08 /bin/bash 1767 -rwxr-xr-x 1 root root 605140 Sep 27 02:08 /bin/rbash -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN