Date: Fri, 10 Oct 2014 10:38:05 -0500 (CDT) From: "Valeri Galtsev" <galtsev@kicp.uchicago.edu> To: "Michael Sierchio" <kudzu@tenebras.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: sh man page .... Message-ID: <61956.128.135.70.212.1412955485.squirrel@cosmo.uchicago.edu> In-Reply-To: <CAHu1Y70u6FSwYDnA0KBctWKjJrTWrYrn82eqO_UBX2L30H2Vnw@mail.gmail.com> References: <5437FB8B.9080008@hiwaay.net> <CAHu1Y70u6FSwYDnA0KBctWKjJrTWrYrn82eqO_UBX2L30H2Vnw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, October 10, 2014 10:30 am, Michael Sierchio wrote: > On Fri, Oct 10, 2014 at 8:30 AM, William A. Mahaffey III <wam@hiwaay.net> > wrote: > >>.....I had a bunch of shell scripts written to use Linux >> sh, which was in fact bash, which means it had a superset of the >> arithmetic >> operators that traditional sh had. When I use these scripts under sh >> under >> FBSD 9.3, they largely work, though there are some minor differences >> (empty >> strings evaluate to zero (0) under bash, error under sh). The man page >> for >> sh doesn't reflect some of these compatibilities/incompatibilities, > > Nor should it. The Bourne Shell is the Bourne Shell, is adequately > documented by the man page, and warnings about incompatibility are the > responsibility of those who foist off bash as sh. > > You're blaming your own bad habit on others. :-) > Let me second it. I recently re-discovered (yes, I knew it since long ago, just forgot) that Linuxes usually have "sh" as a symlink just pointing to bash. It kind of kicked me out of my chair: security wise (and in general) you shouldn't use large code (which bash is) to do just a small set of "features" (which sh is). It just reminded me that Linux started in general as a "hack" and still didn't fully grew out of it... Valeri ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61956.128.135.70.212.1412955485.squirrel>