Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4DD8D1014F for ; Thu, 3 Apr 2014 07:59:10 +0000 (UTC) Received: (qmail 44478 invoked by uid 500); 3 Apr 2014 07:59:04 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 44017 invoked by uid 500); 3 Apr 2014 07:59:02 -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 44005 invoked by uid 99); 3 Apr 2014 07:58:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2014 07:58:59 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2014 07:58:54 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WVcXG-000234-R7 for user@commons.apache.org; Thu, 03 Apr 2014 00:58:07 -0700 Date: Thu, 3 Apr 2014 00:57:51 -0700 (PDT) From: yalmasri To: user@commons.apache.org Message-ID: <1396511871822-4661706.post@n4.nabble.com> In-Reply-To: <20140402214752.000036c4.ecki@zusammenkunft.net> References: <1396422308.62821.YahooMailNeo@web140805.mail.bf1.yahoo.com> <1396428870556-4661653.post@n4.nabble.com> <20140402214752.000036c4.ecki@zusammenkunft.net> Subject: Re: [exec] Using Commons Exec for context-sensitive execution MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Bernd Eckenfels wrote > Hello, > > did you try to write actual line endings? > > I tested your code and it worked on Windows (cygwin bash) after adding > \n like: > > os.write("export MY_VAR=test\n"); > os.flush(); > os.write("echo myvar:$MY_VAR\n"); > > Gruss > Bernd Thanks, that made the trick. Bernd Eckenfels wrote > I also think the use of the common-executor makes this whole stuff > unecesary complicated. Especially if the alternative is a Java7 with > ProcessBuilder and redirectOutput(); Yea, can't agree more -- View this message in context: http://apache-commons.680414.n4.nabble.com/exec-Using-Commons-Exec-for-context-sensitive-execution-tp4661652p4661706.html Sent from the Commons - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org