commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yalmasri <ysralma...@yahoo.com>
Subject Re: [exec] Using Commons Exec for context-sensitive execution
Date Thu, 03 Apr 2014 07:57:51 GMT
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


Mime
View raw message