<div dir="ltr"><div>[mhyclak@centos-dev ~]$ lsb_release -d</div><div>Description:<span class="" style="white-space:pre">        </span>CentOS Linux release 7.2.1511 (Core) </div><div>[mhyclak@centos-dev ~]$ ls -l /bin/sh</div><div>lrwxrwxrwx. 1 root root 4 Dec 23 09:06 /bin/sh -> bash</div><div><br></div><div>Probably explains CentOS.</div><div><br></div><div>There is no sh, only Zuul</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 14, 2016 at 2:29 PM, <span dir="ltr"><<a href="mailto:jep200404@columbus.rr.com" target="_blank">jep200404@columbus.rr.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 12 Jan 2016 13:52:13 -0500, <a href="mailto:jep200404@columbus.rr.com">jep200404@columbus.rr.com</a> wrote:<br>
<br>
> I was burned by a subtle difference between Bourne shell and bash.<br>
><br>
> lunch@phyphompho:~/20160113$ ./p1.sh hello world<br>
> p3 $1: hello<br>
> p3 $@: hello world<br>
> p3 $1: hello<br>
> p3 $@: hello world<br>
> lunch@phyphompho:~/20160113$ ./p2.sh hello world<br>
> p3 $1: hello<br>
> p3 $@: hello world<br>
> p3 $1: moby<br>
> p3 $@: moby grape<br>
> lunch@phyphompho:~/20160113$ ll p*<br>
<br>
That was on Ubuntu 14.04.3<br>
<br>
Centos 7 yields different results:<br>
<br>
[lunch@cohpy 20160120]$ ./p1.sh hello world<br>
p3 $1: hello<br>
p3 $@: hello world<br>
p3 $1: moby<br>
p3 $@: moby grape<br>
[lunch@cohpy 20160120]$ ./p2.sh hello world<br>
p3 $1: hello<br>
p3 $@: hello world<br>
p3 $1: moby<br>
p3 $@: moby grape<br>
[lunch@cohpy 20160120]$ ll p*<br>
-rwxr-x---. 1 lunch lunch 42 Jan 14 14:05 p1.sh<br>
-rwxr-x---. 1 lunch lunch 44 Jan 14 14:05 p2.sh<br>
-rw-r-----. 1 lunch lunch 36 Jan 14 14:05 p3.sh<br>
[lunch@cohpy 20160120]$ head p*<br>
==> p1.sh <==<br>
#!/bin/sh<br>
<br>
. ./p3.sh<br>
. ./p3.sh moby grape<br>
<br>
==> p2.sh <==<br>
#!/bin/bash<br>
<br>
. ./p3.sh<br>
. ./p3.sh moby grape<br>
<br>
==> p3.sh <==<br>
echo "p3 \$1: $1"<br>
echo "p3 \$@: $@"<br>
[lunch@cohpy 20160120]$ diff p1.sh p2.sh<br>
1c1<br>
< #!/bin/sh<br>
---<br>
> #!/bin/bash<br>
[lunch@cohpy 20160120]$<br>
_______________________________________________<br>
colug-432 mailing list<br>
<a href="mailto:colug-432@colug.net">colug-432@colug.net</a><br>
<a href="http://lists.colug.net/mailman/listinfo/colug-432" rel="noreferrer" target="_blank">http://lists.colug.net/mailman/listinfo/colug-432</a><br>
</blockquote></div><br></div>