On Tue, Aug 2, 2011 at 10:34 PM, Steven W. Orr <ste...@syslang.net> wrote:
> On 8/2/2011 9:05 AM, Dmitry Bolshakov wrote: > >> hi >> >> perl has "-x" switch which makes it skip leading file contents until the >> #!/bin/perl >> line >> >> imho it would be good to have the same feature in bash >> >> > Huge misteak. The shebang is processed by the exec system call. Only true when a script, e.g. foo.sh, is invoked by ``./foo.sh''. What Dmitry wants is a new option, say ``--perl-x'', and he wants to invoke the script by ``bash --perl-x foo.sh''. You can take a look at Perl's ``-x'' explanation. I like that. :-) > As such, it must occupy the first 16 bits of the file. The #! is the magic > number that makes it work. What possible value is there in subverting a > perfectly good system call? > > -- > Time flies like the wind. Fruit flies like a banana. Stranger things have > .0. > happened but none stranger than this. Does your driver's license say Organ > ..0 > Donor?Black holes are where God divided by zero. Listen to me! We are all- > 000 > individuals! What if this weren't a hypothetical question? > steveo at syslang.net > >