[erlang-questions] Command line and quotes

Pupeno pupeno@REDACTED
Wed Dec 6 15:06:01 CET 2006


On Wednesday 06 December 2006 10:58, Mats Cronqvist wrote:
> Pupeno wrote:
> > Hello,
> > I have a script that starts and stops my Erlang application
> > fanterlasticfour, the command to start is (in bash):
> >
> >  "$RUN_ERL -daemon $PIPEDIR/ $LOGDIR/ \"$ERL -sname $NAME -boot
> > fanterlasticfour -config
> > /usr/local/etc//fanterlasticfour/fanterlasticfour\""
>
>    i don't really know anything about bash quoting, but this;
>
> $ run_erl -daemon /tmp/ /tmp "erl -sname aname"

If I copy the echoed line and run it in works.

> #!/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).
-- 
Pupeno <pupeno@REDACTED> (http://pupeno.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20061206/e3cd30c7/attachment.bin>


More information about the erlang-questions mailing list