Probably best to just modify the exec source to better handle more complex
commands. The pipe is always a function of the shell so the proper way to
do that is always sh -c ... Obviously we should make that work. The simple
split on one or more spaces regex was a quick way of getting things going;
I didn't expect it to survive this long. :)

If you could open a JIRA with your examples below that would be great.
Thanks!

On Wed, Jun 13, 2012 at 7:13 AM, Guillaume Polaert <[email protected]>wrote:

>  Hi everybody,****
>
> ** **
>
> I’m trying to use exec source with a pipe like that : iostat –c 10 |
> cpu2json.sh and it doesn’t work.****
>
> So I tried something like:  sh –c “iostat –c 10 | cpu2json.sh” … with the
> same result. ****
>
> ** **
>
> But as far as I know, the command is launched by Runtime.exec(args[])
> where args[] is the result of command.split(\\s+) so “iostat –c 10 ..” is
> splited too.****
>
> This is why it doesn’t work. Is it right ?****
>
> ** **
>
> It’s easy to bypass the problem but is there a interest to modify exec
> behavior or write a new source “sh” ?****
>
> ** **
>
> Thanks, Guillaume****
>
> ** **
>
> ** **
>
> *Guillaume Polaert* | Cyrès Conseil****
>
> ** **
>



-- 
Eric Sammer
twitter: esammer
data: www.cloudera.com

Reply via email to