Shebang script with arguments

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Shebang script with arguments

Rodrigo Botafogo
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´ve 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



Reply | Threaded
Open this post in threaded view
|

Re: Shebang script with arguments

Charles Duffy
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".

On Mon, Mar 30, 2015 at 3:55 PM, Rodrigo Botafogo
<[hidden email]> 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´ve 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
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Shebang script with arguments

Rodrigo Botafogo
So, can I use shell variables? Any other solution? Any ideas?

Thanks,

2015-03-30 18:05 GMT-03:00 Charles Duffy <[hidden email]>:
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".

On Mon, Mar 30, 2015 at 3:55 PM, Rodrigo Botafogo
<[hidden email]> 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´ve 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
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Rodrigo Botafogo



Reply | Threaded
Open this post in threaded view
|

Re: Shebang script with arguments

Rodrigo Botafogo
Does JRUBY_OPTS helps in this case?  How do I use this?

2015-03-30 18:12 GMT-03:00 Rodrigo Botafogo <[hidden email]>:
So, can I use shell variables? Any other solution? Any ideas?

Thanks,

2015-03-30 18:05 GMT-03:00 Charles Duffy <[hidden email]>:

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".

On Mon, Mar 30, 2015 at 3:55 PM, Rodrigo Botafogo
<[hidden email]> 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´ve 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
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Rodrigo Botafogo






--
Rodrigo Botafogo



Reply | Threaded
Open this post in threaded view
|

Re: Shebang script with arguments

Chris Seaton
In reply to this post by Rodrigo Botafogo
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 <[hidden email]> wrote:

So, can I use shell variables? Any other solution? Any ideas?

Thanks,

2015-03-30 18:05 GMT-03:00 Charles Duffy <[hidden email]>:
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".

On Mon, Mar 30, 2015 at 3:55 PM, Rodrigo Botafogo
<[hidden email]> 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´ve 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
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Rodrigo Botafogo