Double escaping in $ARGx$

Andreas Ericsson ae at op5.se
Wed Aug 5 12:07:52 CEST 2009


Thomas Guyot-Sionnest wrote:
> 
> A bit off-topic, but I believe it would be nice to have a way to execute
> commands directly rather than using the shell. I'm thinking of a
> different command option that could be used instead of "command_line"...
> i.e.:
> 
> command_exec $USER1$/check_dummy!1!WARNING: $SERVICEDESC$ is stale.
> 
> Basically, the first argument is the full path to the executable, and
> following ones are the argument array passed to execve. Bangs (!) would
> be argument separators (like in service definitions) with maybe the
> possibility of escaping them (otherwise a bang in a macro can do the trick).
> 
> That would give much more flexibility when complex parameters must be
> passed.
> 

Why use the exclamation mark at all? It's quite straightforward to parse
shell-style quoting into arguments, and that way users can just cut-n-paste
the commands to verify that they work (assuming they replace the macros,
that is).

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july




More information about the Developers mailing list