[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shebang



On Fri, Apr 04, 2014 at 02:00:46PM +0200, Thorsten Glaser wrote:
> > I'm interested where POSIX says what you are sure it says (that the
> > shell is responsible for evaluating #!).
> 
> I said the shell is supposed to, and suggested to search POSIX, but
> I wasn’t sure that it was POSIX standardised, and never said so. As
> you cited, it’s probably not. Doesn’t mean the shell doesn’t or
> shouldn’t.
Can you please refrain from asking to "search something" when you are not
sure something even exists?

> > > Also, “man mksh” look for EXECSHELL (which is the interpreter the
> > > shell uses if the script doesn’t even have a shebang).
> >
> > I don't think the manual for a not commonly used shell is a good
> > reference...
> 
> Uhm, excuse me?
> 
> “Larry Page: 1.5 million Android devices activated every day”
> “Android device activations set to hit 1 billion soon”
> ‣ http://www.androidcentral.com/larry-page-15-million-android-devices-activated-every-day
> That was on 2013-07-18; by that time, every new device activation
> meant one new mksh user.
> 
> “Google announced that in Q3 2011, the total number of Android
> activations had surpassed 190 million, which was a significant increase
> from 135 million the previous quarter. The increase was boosted by sales
> of Android smartphones at lower prices from Chinese and Indian
> manufacturers.[2] As of 3 September 2013, there have been 1 billion
> Android devices activated.[3]”
> ‣ https://en.wikipedia.org/wiki/Comparison_of_Android_devices
> Every 4.x device, and many others, run mksh as system shell
> (/system/bin/sh, Android’s equivalent of our /bin/sh).
> 
> According to the graphics at
> https://en.wikipedia.org/wiki/File:Android_historical_version_distribution_-_vector.svg
> that’s over ¾ of all devices (although the graphics is unclear as to
> whether that is the total number of all activations, or (as seems to
> be common with statistics from Google) the number of currently “live”
> devices). Add to that the amount of devices running AOSP or another
> non-phone-home firmware (Replicant, maybe SiMKo3, Cyanogen… well it
> does phone home…).
> 
> There are also hundreds of Debian (or derivates) systems running
> with mksh as /bin/sh (I should know, I set up a good part of them).
> 
> All FreeWRT, MidnightBSD, MirBSD, and recent OpenADK systems run
> with mksh as system shell (/bin/sh); sta.li will do that too.
> 
> There’s also a lot of systems that c̲a̲n̲ run with mksh as system shell
> at the administrator’s choice. Debian, all BSDs (NetBSD® only from
> version 1.6 onwards, 1.5 has ashisms in the init scripts), Crux,
> FreeMiNT, Deli Linux, etc. at least.
> 
> And only then add the sheer amount of systems where mksh is used
> but not as system shell…
> 
> I honestly doubt that any other Unix shell is currently used as
> widespread as mksh.
Doesn't make it more authoritative or something.

-- 
WBR, wRAR


Reply to: