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 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(); Am Wed, 2 Apr 2014 01:54:30 -0700 (PDT) schrieb yalmasri <ysralma...@yahoo.com>: > posting to fix the formatting on other mailing archives > > > > -- > View this message in context: > http://apache-commons.680414.n4.nabble.com/exec-Using-Commons-Exec-for-context-sensitive-execution-tp4661652p4661653.html > Sent from the Commons - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org