commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siegfried Goeschl <sgoes...@gmx.at>
Subject Re: [exec] Re: Redirect shell output
Date Sun, 31 Oct 2010 12:34:28 GMT
Hi Johan,

sorry for bugging you - any progress from your side? We also appreciate 
success stories ... :-)

Thanks in advance

Siegfried Goeschl

On 10/24/10 11:33 PM, Johan Hertz wrote:
> Hi Siegfried,
>
> It is a bit late for me to test this now, but thank you very much for
> pointing me in the right direction.
>
> Regards
> Johan
>
> On 24/10/2010 20:51, Siegfried Goeschl wrote:
>> Hi Johan,
>>
>> I used the following test
>>
>> >>> Start >>>
>> public void testMe() throws Exception {
>> if(OS.isFamilyUnix()) {
>> File testScript =
>> TestUtil.resolveScriptForOS("./src/test/scripts/standalone");
>> System.out.println("Executing the following test script : " +
>> testScript.getAbsolutePath());
>> Executor exec = new DefaultExecutor();
>> exec.setStreamHandler(new PumpStreamHandler());
>> CommandLine cl = new CommandLine(testScript);
>> exec.execute(cl);
>> assertTrue(new File("./target/mybackup.gz").exists());
>> }
>> }
>> <<< End <<<
>>
>> using
>>
>> cat pom.xml | gzip> ./target/mybackup.gz
>>
>> and it worked as expected
>>
>> Cheers,
>>
>> Siegfried Goeschl
>>
>> On 10/24/10 12:36 PM, Johan Hertz wrote:
>>> Hi Paul,
>>>
>>> Sorry about that.
>>>
>>> /Regards
>>> Johan
>>>
>>> On 24/10/2010 11:11, Paul Libbrecht wrote:
>>>> Johan,
>>>>
>>>> which project are you asking this from?
>>>> commons-exec?
>>>> Please read the netiquette of this list... you need to make this
>>>> clear otherwise you don't reach the right people.
>>>>
>>>> paul
>>>>
>>>>
>>>> On 24 oct. 2010, at 10:56, Johan Hertz wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying to redirect output using something like this:
>>>>>
>>>>> zfs send rpool/data@test | gzip> mybackup.gz
>>>>>
>>>>> I can't find a way to do it, is there not a way similar to how ant
>>>>> do it?
>>>>> http://ant.apache.org/faq.html#shell-redirect-2
>>>>>
>>>>> Regards
>>>>> Johan
>>>>> __________________________________________________
>>>>> Använder du Yahoo!?
>>>>> Är du trött på spam? Yahoo! E-post har det bästa spamskyddet som
>>>>> finns http://se.mail.yahoo.com
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>
>>> __________________________________________________
>>> Använder du Yahoo!?
>>> Är du trött på spam? Yahoo! E-post har det bästa spamskyddet som
>>> finns http://se.mail.yahoo.com
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>
> __________________________________________________
> Använder du Yahoo!?
> Är du trött på spam? Yahoo! E-post har det bästa spamskyddet som finns
> http://se.mail.yahoo.com
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message