[erlang-questions] Command line and quotes

Mats Cronqvist mats.cronqvist@REDACTED
Wed Dec 6 16:48:51 CET 2006


Pupeno wrote:
> On Wednesday 06 December 2006 10:58, Mats Cronqvist wrote:
>> #!/bin/bash
>> run_erl -daemon /tmp/ /tmp "erl -sname aname"
>>
>>    should (and does) work.
> 
> Well, but that's not flexible enough. Parts of the command line come from 
> variables and I can't avoid it and the whole command line may be run under 
> different situations (verbose/no verbose) and/or echoed, so I have to put it 
> in a variable (or repeat myself).

   perhaps my example was a bit oversimplified. this is a more realistic one 
(still a bit simplified);

#!/bin/bash
FLAGS="-sname aname"
RE="run_erl -daemon /tmp/ /tmp"
ERL=erl
$RE "$ERL $FLAGS"

   i find that quite flexible.
   but if you require the last line to be one variable i can't help you.

   mats



More information about the erlang-questions mailing list