Date: Sun, 19 May 2013 02:43:40 -0400 From: Quartz <quartz@sneakertech.com> To: "<freebsd-questions@freebsd.org>" <freebsd-questions@freebsd.org> Subject: Re: check variable content size in sh script Message-ID: <5198749C.5050904@sneakertech.com> In-Reply-To: <13CA24D6AB415D428143D44749F57D7201F50963@ltcfiswmsgmb26> References: <5194F65F.6080503@a1poweruser.com> <5194FB0A.9090400@tundraware.com> <13CA24D6AB415D428143D44749F57D7201F4D41F@ltcfiswmsgmb26> <5197998E.6050200@sneakertech.com> <51979A8B.8080703@tundraware.com> <5197A526.7020302@sneakertech.com> <20130518180634.9e5fd3c2.freebsd@edvax.de> <519814A7.8070702@sneakertech.com> <13CA24D6AB415D428143D44749F57D7201F508F2@ltcfiswmsgmb26> <13CA24D6AB415D428143D44749F57D7201F50963@ltcfiswmsgmb26>
next in thread | previous in thread | raw e-mail | index | archive | help
> I say this from a FreeBSD context. It may entirely be possible that a > Linux distro uses bash in /bin/sh Yes. For most (all?) linux distros as well as osx, /bin/sh is actually bash. When I say "emulation mode" I mean running a script with a "#!/bin/sh" header on a system that doesn't have a real copy of sh. Whatever shell ends up running the script is effectively emulating sh's environment, at least in my mind. Bash is well known for not complaining when you use bash-specific features in a script which uses a "#!/bin/sh" header. This trips up many a programmer and causes script failures on systems where sh is not actually bash in disguise. This is why I question some things as to whether they're *really* valid pure sh syntax and not something that just happens to work in whatever shell is pretending to be sh (which I thought was tcsh on this machine I just did that test on, but on second look maybe not). ______________________________________ it has a certain smooth-brained appeal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5198749C.5050904>