public inbox for gentoo-server@lists.gentoo.org
 help / color / mirror / Atom feed
From: Korthrun <korthrun@gmail.com>
To: gentoo-server@lists.gentoo.org
Subject: Re: [gentoo-server] Scripting fun
Date: Mon, 30 Jun 2008 19:10:00 -0700	[thread overview]
Message-ID: <7d20977a0806301910x5cab7fa2r850d5e7c966d87da@mail.gmail.com> (raw)
In-Reply-To: <ac6df3680806091959k45435f27wd871ff7359d7e674@mail.gmail.com>

On Mon, Jun 9, 2008 at 7:59 PM, JD Gray <kahdgarxi@gmail.com> 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" kahdgarxi@gmail.com;
> 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" kahdgarxi@gmail.com

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



      parent reply	other threads:[~2008-07-01  2:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=7d20977a0806301910x5cab7fa2r850d5e7c966d87da@mail.gmail.com \
    --to=korthrun@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