Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Globbing arguments with runCommand

7 views
Skip to first unread message

Chandler Kent

unread,
Oct 15, 2009, 2:00:57 PM10/15/09
to
How can I get the arguments to a command called with runCommand to
perform wildcard expansion?

For example, if I call runCommand("ls", "*/*/Test.*"), runCommand
calls "ls */*/Test.*" instead of correctly calling ls with the
arguments after doing wildcard expansion.

Is there a way to get this behavior using runCommand?

Joran Greef

unread,
Oct 15, 2009, 2:26:36 PM10/15/09
to
I don't know if there's a better way, but I tried for a long time with
runCommand and Java's own methods for that, and then came up with the
idea of using a shell script as a proxy, since I also wanted to be
able to pass in a single shell command as in Ruby, rather than break
up a command into command and arguments as runCommand requires:

runCommand('shell', command, options)

And in the 'shell' proxy script:

#!/bin/sh
eval $1

peggy

unread,
Nov 19, 2009, 3:21:34 AM11/19/09
to
hi,

if i want run a shell file with arguments,
ex. test.sh arg1

how can i use runCommand to run it?

thanks

"Joran Greef" <joran...@gmail.com> wrote in message
news:f0ddf1df-7127-4aac...@l2g2000yqd.googlegroups.com...

0 new messages