reading stdin/munpack decoding html email
[email protected] Sat, 6 Sep 2014 15:59:54 +1000
| Newsgroups | gmane.org.user-groups.slug.general |
|---|---|
| Message-ID | <[email protected]> |
I have a script running from getmail that sends an sms on receipt of email, that works well. but, I would like to include contents of the email, (or part of it); inbound email is HTML only, no text part getmail passess the fetched email on stdin, so I need to read stdin, munpack detach html 'part2' then, put 160 chars of 'part2' to sms I've found this #!/bin/bash VALUE=$(cat) echo "$VALUE" > email gets whole email written out, I'm trying to feed it to munpack in more elegant way that that I'm doing, using file after file written out to disk munpack -t -f email can I just pipe it? to munpack, this is where I get lost, trail'n'error is lousy substitute for proper syntax -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html