[tpm] How to pipe variable content to shell scripts

Antonio Sun tpm.ats at spamgourmet.com
Tue Jan 21 09:29:43 PST 2014


Hi,

I have a script that works on xml content. A thousand time simplified
version is:

 xml_output | perl -n000e 's,(?<=">)(.*?)(?=</HttpBody>),`echo $1 | wc
-c`,eg; print'

I.e., I need to pipe the matching string ($1, content between tag HttpBody)
to an external program via shell. As you can tell, if the matching content is
too big for shell parameter length, my script will fail.

I *have to* process the matching string via the external program. Is there
any way I can get around this?

Thanks

Antonio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20140121/a917419a/attachment.html>


More information about the toronto-pm mailing list