Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2013 02:43:40 -0400
From:      Quartz <>
To:        "<>" <>
Subject:   Re: check variable content size in sh script
Message-ID:  <>
In-Reply-To: <13CA24D6AB415D428143D44749F57D7201F50963@ltcfiswmsgmb26>
References:  <> <> <13CA24D6AB415D428143D44749F57D7201F4D41F@ltcfiswmsgmb26> <> <> <> <> <> <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: <>