On Mon, Jun 9, 2008 at 7:59 PM, JD Gray <[EMAIL PROTECTED]> wrote: > I'm running the below script on my gentoo servers to email me whenever > there are GLSA's affecting me. It works like a charm, but I have one > beef with it. Newlines are not preserved, so I get a lovely Wall Of > Text (tm) when ever it sends me the GLSA. I'm guessing this is because > of the way bash handles variables. Anyone have any insight on how to > correct this? > > #!/bin/bash > > /usr/bin/glsa-check -t all &> /dev/null > CHECK_RESULT="`/usr/bin/glsa-check -t all 2>&1`" > > if [ "$CHECK_RESULT" != "" ]; then > echo $CHECK_RESULT | /bin/mail -s "Frog glsa-check" [EMAIL PROTECTED]; > fi > > Thanks in advance > > -JD > -- > gentoo-server@lists.gentoo.org mailing list > > echo $CHECK_RESULT | sed -e 's/\n/\r\n/' | /bin/mail -s "Frog glsa-check" [EMAIL PROTECTED]
Might make that work how you'd expect. -- () The ASCII Ribbon Campaign - against HTML Email, /\ vCards, and proprietary formats. -- gentoo-server@lists.gentoo.org mailing list