On Mon, 2009-04-27 at 22:37 +0200, Martin Langhoff wrote:
Hi all,
I have a simple shell scripting problem :-) you'll find attached a
shell script that ships with ejabberd. It is a fairly straightforward
bit of code, and allows us to control bits of the ejabberd internals
with a nice cli
On Tue, 2009-04-28 at 11:17 +0200, Martin Langhoff wrote:
On Tue, Apr 28, 2009 at 9:27 AM, Ignacio Vazquez-Abrams
ivazquez...@gmail.com wrote:
# in the script, the CMD is built up as a string
CMD=touch $@
http://mywiki.wooledge.org/BashFAQ/050
That repeats what we know already. The
On Tue, Apr 28, 2009 at 1:01 PM, Ignacio Vazquez-Abrams
ivazquez...@gmail.com wrote:
Which part of the following doesn't work?
Just test your minimal 3 line script with the example input I've given
you. It breaks:
# cat sample.sh
#! /bin/bash
CMD=(touch $@)
bash -c ${c...@]}
# ./sample.sh
bert wrote:
On 28.04.2009, at 13:37, Martin Langhoff wrote:
On Tue, Apr 28, 2009 at 1:19 PM, Ignacio Vazquez-Abrams
ivazquez...@gmail.com wrote:
Ah, I see now.
Try this:
bash -c 'touch $@' ${c...@]}
Riiight, that works better... but
Or in the case of the
On Tue, 2009-04-28 at 12:38 +0200, Martin Langhoff wrote:
On Tue, Apr 28, 2009 at 12:03 PM, Ignacio Vazquez-Abrams
ivazquez...@gmail.com wrote:
But if you're willing to let go of this futile quest to keep $CMD a
string then you'll find that it can be done:
Your example doesn't work. I
On Tue, Apr 28, 2009 at 9:27 AM, Ignacio Vazquez-Abrams
ivazquez...@gmail.com wrote:
# in the script, the CMD is built up as a string
CMD=touch $@
http://mywiki.wooledge.org/BashFAQ/050
That repeats what we know already. The thing is that we are building
the command as a string for runuser,
Hi all,
I have a simple shell scripting problem :-) you'll find attached a
shell script that ships with ejabberd. It is a fairly straightforward
bit of code, and allows us to control bits of the ejabberd internals
with a nice cli interface. (Feel free to skip the start / stop bits of
the code,
hi martin --
I have a simple shell scripting problem :-) you'll find attached a
shell script that ships with ejabberd. It is a fairly straightforward
bit of code, and allows us to control bits of the ejabberd internals
with a nice cli interface. (Feel free to skip the start / stop bits of
I'm no maven, but the last time I was dealing with quoting issues with
$* expansion I had found this article helpful:
http://www.ibm.com/developerworks/library/l-bash-parameters.html?ca=drs-
Sean
On Mon, Apr 27, 2009 at 10:37 PM, Martin Langhoff
martin.langh...@gmail.com wrote:
Hi all,
I