Veja Redirecionar a saída para o arquivo :
#!/bin/sh
HOST=192.168.2.220
PORT=8080
nc $HOST $PORT 0 << __EOF__ > output.txt
POST / HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<adm:serverInfo xmlns:adm="http://log4ensics.com/2010/AdminInterface"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
__EOF__