Firstly, the bash script works fine when I call it outside of ant. Here is the relevant part of the build.xml
<exec executable="/bin/bash" failonerror="true">
<arg value="-c" />
<arg value="script.sh" />
</exec>
Here is the relevant line in the bash script (script.sh):
nc -l 8044 | tee ./nc-out.txt &
When I call script.sh from bash, the contents of nc-out.txt get populated with the data sent to port 8044.
I require the ampersand there.
When the shell script is called from ant, it seems as if nc-out.txt is created, but stays empty.
A normal redirect such as:
nc -l 8044 > nc-out.txt &
Also does not work..
Any insight would be useful!
Thanks!