public inbox for gentoo-server@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-server] Scripting fun
@ 2008-06-10  2:59 JD Gray
  2008-06-10  3:21 ` RijilV
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: JD Gray @ 2008-06-10  2:59 UTC (permalink / raw
  To: gentoo-server

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" kahdgarxi@gmail.com;
fi

Thanks in advance

-JD
-- 
gentoo-server@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-07-16 16:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-10  2:59 [gentoo-server] Scripting fun JD Gray
2008-06-10  3:21 ` RijilV
2008-06-10  3:39 ` W.Kenworthy
2008-06-10  3:52   ` Francisco Ares
2008-06-10  4:15     ` Marius Mauch
2008-07-16 14:13       ` A. Khattri
2008-06-10  3:53   ` W.Kenworthy
2008-07-01  2:10 ` Korthrun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox