From: "JD Gray" <kahdgarxi@gmail.com>
To: gentoo-server@lists.gentoo.org
Subject: [gentoo-server] Scripting fun
Date: Mon, 9 Jun 2008 19:59:30 -0700 [thread overview]
Message-ID: <ac6df3680806091959k45435f27wd871ff7359d7e674@mail.gmail.com> (raw)
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
next reply other threads:[~2008-06-10 2:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 2:59 JD Gray [this message]
2008-06-10 3:21 ` [gentoo-server] Scripting fun 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac6df3680806091959k45435f27wd871ff7359d7e674@mail.gmail.com \
--to=kahdgarxi@gmail.com \
--cc=gentoo-server@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox