[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: findjava requirement



Hallo Ben,

* Ben Burton wrote:
>On the other hand, Perl deals with things like quoting and other
>problems resulting from unanticipated command-line arguments somewhat
>better than sh does (e.g., you can start the JVM by passing its
>command-line arguments as an array, not by some piece of sh black magic
>that gets the quotes right and separates arguments - some of which
>may contain spaces - at exactly the right places [1]).
>[1] Perhaps you can do this in sh too and I just don't know how.
>Regardless, I stand by the point made in the second paragraph.

aehm :)

Bash (that's what it is written in currently. But I guess, that plain
sh isn't different here) will seperate all 'words' in your
commandline, if you don't quote them. Words in this case means,
everything, which is seperated by one of the chars in $IFS.

So, if you don't want to have your things seperated, either set $IFS
correctly (for you case) or make sure that around your things are a
quote.

I tiped into that one, while I was rewriting the splash screen
mechanism in eclipse. It needed 'command argument' as one option, as in
eclipse ... -splash 'command argument' ...

Anyway, it doesn't matter at all, as we can't use it when we don't
want to have the requirement that *all* starter scripts have to be
written in perl. findjava is use as in JAVACMD=$(findjava ...), so the
*output* of the script is relevant and you can't preserve 'words' in
this case. 

Jan
-- 
Jan Schulz                     jasc@gmx.net
     "Wer nicht fragt, bleibt dumm."



Reply to: