1 |
On Mon, Jun 9, 2008 at 7:59 PM, JD Gray <kahdgarxi@×××××.com> wrote: |
2 |
> I'm running the below script on my gentoo servers to email me whenever |
3 |
> there are GLSA's affecting me. It works like a charm, but I have one |
4 |
> beef with it. Newlines are not preserved, so I get a lovely Wall Of |
5 |
> Text (tm) when ever it sends me the GLSA. I'm guessing this is because |
6 |
> of the way bash handles variables. Anyone have any insight on how to |
7 |
> correct this? |
8 |
> |
9 |
> #!/bin/bash |
10 |
> |
11 |
> /usr/bin/glsa-check -t all &> /dev/null |
12 |
> CHECK_RESULT="`/usr/bin/glsa-check -t all 2>&1`" |
13 |
> |
14 |
> if [ "$CHECK_RESULT" != "" ]; then |
15 |
> echo $CHECK_RESULT | /bin/mail -s "Frog glsa-check" kahdgarxi@×××××.com; |
16 |
> fi |
17 |
> |
18 |
> Thanks in advance |
19 |
> |
20 |
> -JD |
21 |
> -- |
22 |
> gentoo-server@l.g.o mailing list |
23 |
> |
24 |
> |
25 |
echo $CHECK_RESULT | sed -e 's/\n/\r\n/' | /bin/mail -s "Frog |
26 |
glsa-check" kahdgarxi@×××××.com |
27 |
|
28 |
Might make that work how you'd expect. |
29 |
|
30 |
|
31 |
-- |
32 |
() The ASCII Ribbon Campaign - against HTML Email, |
33 |
/\ vCards, and proprietary formats. |
34 |
-- |
35 |
gentoo-server@l.g.o mailing list |