Hello,
when using pipes in shell scripts I often get the error mentioned in the subject line.
To reproduce the issue add an "execute shell" build step to a new job and run the following:
echo replace e by a | sed 's_e_a_g' | echo done
This might not make much sense - but it generates the error "couldn't flush stdout" while this does not happen when executing the same in a terminal.
The jenkins console output produces:
[EnvInject] - Loading node environment variables.
Building on master in workspace /home/jenkins/build-server/jobs/test.sed/workspace
[workspace] $ /bin/sh -xe /tmp/hudson7236481234921041257.sh
+ echo replace e by a
+ echo done
done
+ sed s_e_a_g
sed: couldn't flush stdout: Broken pipe
Finished: SUCCESS
best regards,
Matthias