Re: [jruby-user] Shebang script with arguments
Chris Seaton <[email protected]> Mon, 30 Mar 2015 22:17:52 +0100
| Newsgroups | gmane.comp.lang.jruby.user |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_F4F73DDF-AB51-44A2-96AA-B2A7C9173A50 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 You can have a second script that executes JRuby with the arguments you = want, and use that in the shebang line. Chris > On 30 Mar 2015, at 22:12, Rodrigo Botafogo = <[email protected]> wrote: >=20 > So, can I use shell variables? Any other solution? Any ideas? >=20 > Thanks, >=20 > 2015-03-30 18:05 GMT-03:00 Charles Duffy <[email protected] = <mailto:[email protected]>>: > POSIX doesn't generally allow more than one argument (other than the > interpreter name itself) to be passed as part of a shebang, so even if > your operating system supports this, it won't be portable: You've > already filled that one position with "jruby", since slot 0 is "env". >=20 > On Mon, Mar 30, 2015 at 3:55 PM, Rodrigo Botafogo > <[email protected] <mailto:[email protected]>> = wrote: > > Hello... > > > > I have a shebang script for jruby, and I need to change the java = heap space > > in it. How do I do that? Is it possible? > > > > Doing: > > > > #!/usr/bin/env jruby -J-Xmx1024m > > > > does not work. > > > > I=C2=B4ve seen a suggestion, that for Python the best would be to = add the > > parameter to a shell variable. Can this be done for JRuby? > > > > > > Thanks a lot.... > > > > -- > > Rodrigo Botafogo > > > > > > >=20 > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: >=20 > http://xircles.codehaus.org/manage_email = <http://xircles.codehaus.org/manage_email> >=20 >=20 >=20 >=20 >=20 > --=20 > Rodrigo Botafogo >=20 >=20 >=20 --Apple-Mail=_F4F73DDF-AB51-44A2-96AA-B2A7C9173A50 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div class=3D"">You can have a second script that executes = JRuby with the arguments you want, and use that in the shebang = line.</div><div class=3D""><br class=3D""></div><div = class=3D"">Chris</div><br class=3D""><div><blockquote type=3D"cite" = class=3D""><div class=3D"">On 30 Mar 2015, at 22:12, Rodrigo Botafogo = <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" = class=3D"">So, can I use shell variables? Any other solution? Any = ideas?<div class=3D""><br class=3D""></div><div = class=3D"">Thanks,</div></div><div class=3D"gmail_extra"><br = class=3D""><div class=3D"gmail_quote">2015-03-30 18:05 GMT-03:00 Charles = Duffy <span dir=3D"ltr" class=3D""><<a = href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a>></span>:<br class=3D""><blockquote = class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc = solid;padding-left:1ex">POSIX doesn't generally allow more than one = argument (other than the<br class=3D""> interpreter name itself) to be passed as part of a shebang, so even = if<br class=3D""> your operating system supports this, it won't be portable: You've<br = class=3D""> already filled that one position with "jruby", since slot 0 is "env".<br = class=3D""> <div class=3D""><div class=3D"h5"><br class=3D""> On Mon, Mar 30, 2015 at 3:55 PM, Rodrigo Botafogo<br class=3D""> <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:<br class=3D""> > Hello...<br class=3D""> ><br class=3D""> > I have a shebang script for jruby, and I need to change the java = heap space<br class=3D""> > in it. How do I do that? Is it possible?<br class=3D""> ><br class=3D""> > Doing:<br class=3D""> ><br class=3D""> > #!/usr/bin/env jruby -J-Xmx1024m<br class=3D""> ><br class=3D""> > does not work.<br class=3D""> ><br class=3D""> > I=C2=B4ve seen a suggestion, that for Python the best would be to = add the<br class=3D""> > parameter to a shell variable. Can this be done for JRuby?<br = class=3D""> ><br class=3D""> ><br class=3D""> > Thanks a lot....<br class=3D""> ><br class=3D""> > --<br class=3D""> > Rodrigo Botafogo<br class=3D""> ><br class=3D""> ><br class=3D""> ><br class=3D""> <br class=3D""> = </div></div>--------------------------------------------------------------= -------<br class=3D""> To unsubscribe from this list, please visit:<br class=3D""> <br class=3D""> <a href=3D"http://xircles.codehaus.org/manage_email" = target=3D"_blank" = class=3D"">http://xircles.codehaus.org/manage_email</a><br class=3D""> <br class=3D""> <br class=3D""> </blockquote></div><br class=3D""><br clear=3D"all" class=3D""><div = class=3D""><br class=3D""></div>-- <br class=3D""><div = class=3D"gmail_signature"><div dir=3D"ltr" class=3D"">Rodrigo = Botafogo<div class=3D""><br class=3D""><br class=3D""><div class=3D""><br = class=3D""></div></div></div></div> </div> </div></blockquote></div><br class=3D""></body></html>= --Apple-Mail=_F4F73DDF-AB51-44A2-96AA-B2A7C9173A50--