Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I appreciate your insights but you're missing the point. I don't intend to reinvent the wheel and write a new shell. What I need and what I want is to execute Perl scripts with the same shebang in either macOS or Linux, or even Windows XP with the help of MKS Toolkit. Why, because I have multiple Perls installed in each OS and multiple OSes and all share the same Perl source. So, I don't want to have to edit scripts originating in macOS with a #! /usr/bin/env perl -w shebang to #! /usr/bin/perl -w just so they run in debian. perlbrew does this now with nothing more than a fairly sophisticated .bashrc. The cmd code I downloaded that choroba pointed me to does almost what I want now. It only omits actually printing the environment but that is trivial to fix. Whenever this cmd/env is called without any arguments it can print the environment, the %ENV hash. So, you seem to be hinting that Linux is less capable than macOS (just another *NIX), and/or the maintainers of GNU coreutils are incapable of doing or unwilling to do what Apple engineers did and can do? Why do you think this works in macOS and not Linux, other than the maintainers of env don't want to do it? Are fork and exec in Darwin different from their counterparts in Linux? Or BSD, or AIX, or Next, or any other UNIX or UNIX-like OS?

In reply to Re^6: shebang anomaly by perlboy_emeritus
in thread shebang anomaly by perlboy_emeritus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (8)
    As of 2019-12-11 13:23 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?