Re: Shebang parsing

From: Date: Thu, 26 Jan 2012 10:35:51 +0000
Subject: Re: Shebang parsing
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-57526@lists.php.net to get a copy of this message
Surely you can detect which operating system you're running on, and have PHP act accordingly? (Note: on my phone, haven't read the link!) Kiall Sent from my mobile - Sorry for being short. On Jan 26, 2012 10:08 a.m., <devis@lucato.it> wrote: > Hi, > > from > > Ü…Ëjh > yëf8ùÊófhttp://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-with-a-shebang-i-e > > > > > 1. Some operating systems simply treat the entire thing as the path. > After all, in most operating systems, whitespace or dashes > are legal in a > path. > 2. Some operating systems split at whitespace and treat the first > part as the path to the interpreter and the rest as > individual arguments. > 3. Some operating systems split at the *first* whitespace and > treat the front part as the path to the interpeter and the rest as > a > *single* argument (which is what you are seeing). > 4. Some even don't support shebang lines *at all*. > > Thankfully, 1. and 4. seem to have died out, but 3. is pretty widespread, > so you simply cannot rely on being able to pass more than one argument. > > > Devis > > > 2012/1/26 Ferenc Kovacs <tyra3l@gmail.com> > > > it has a length limit, if I remember correctly it is some reall short > value > > on linux. > > it seems to be 127 character: > > http://www.in-ulm.de/~mascheck/various/shebang/ > > > > 2012/1/26 Clint M Priest <cpriest@zerocue.com> > > > > > I've never gotten -d in shebang to work properly, I'd love to see that > > > working. > > > > > > > > -- > > Ferenc Kovács > > @Tyr43l - http://tyrael.hu > > >

« previous php.internals (#57526) next »