Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 59228 invoked from network); 31 Oct 2010 15:47:20 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 Oct 2010 15:47:20 -0000 Received: (qmail 51440 invoked by uid 500); 31 Oct 2010 15:47:19 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 51314 invoked by uid 500); 31 Oct 2010 15:47:18 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 51306 invoked by uid 99); 31 Oct 2010 15:47:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Oct 2010 15:47:17 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sgoeschl@gmx.at designates 213.165.64.22 as permitted sender) Received: from [213.165.64.22] (HELO mail.gmx.net) (213.165.64.22) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 31 Oct 2010 15:47:10 +0000 Received: (qmail invoked by alias); 31 Oct 2010 15:46:49 -0000 Received: from unknown (EHLO deathmarch.local) [38.110.32.2] by mail.gmx.net (mp072) with SMTP; 31 Oct 2010 16:46:49 +0100 X-Authenticated: #35915548 X-Provags-ID: V01U2FsdGVkX1/wj+sWHKnwb8s2vi0oC7hEyXIZHgfEdqOjHt0Xps Dude5X3Lb10IHq Message-ID: <4CCD8F67.6000400@gmx.at> Date: Sun, 31 Oct 2010 16:46:47 +0100 From: Siegfried Goeschl Reply-To: sgoeschl@gmx.at User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Commons Users List , johan_hertz@yahoo.se Subject: Fwd: Re: [exec] Re: Redirect shell output Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Johan, the redirection you are using is provided be the shell and not by the executable you invoke. So you have to put the stuff into a shell script. Cheers, Siegfried Goeschl -------- Original Message -------- Subject: Re: [exec] Re: Redirect shell output Date: Sun, 31 Oct 2010 13:58:27 +0000 From: Johan Hertz Reply-To: Commons Users List To: Commons Users List Hi again, I have tried to wrap it in a script now and it works. I am just a bit curious is there any reason why the command (pfexec zfs send rpool/data@F20101031 | gzip > F20101031.gz) can't work as it is? Regards Johan On 31/10/2010 12:34, Siegfried Goeschl wrote: > 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 >> >> > __________________________________________________ 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