Gentoo Archives: gentoo-user

From: Willie Wong <wwong@××××××××××××××.edu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] rrd to CSV
Date: Mon, 06 Jul 2009 16:11:40
Message-Id: 20090706161514.GA3595@princeton.edu
In Reply to: Re: [gentoo-user] [OT] rrd to CSV by Mick
1 On Sun, Jul 05, 2009 at 11:07:23PM +0100, Penguin Lover Mick squawked:
2 > > from Cacti forums):
3 > > | grep -v NaN | grep '<row>' | tr e ' ' \
4 > > | awk {'print "Q"$2"qcq"$3"qcq"$9"Q"'} \
5 > > | tr Q '"' | tr c ',' | tr q '"'"
6 > >
7 > > Haven't tested it, but looks like it should work.
8 >
9 > Hmm, I don't think it gets anywhere:
10 > =======================================
11 > cat test.xml | grep -v NaN | grep '<row>' | tr e ' ' | awk
12 > {'print "Q"$2"qcq"$3"qcq"$9"Q"'} | tr Q '"' | tr c ',' | tr q '"'" > test.csv
13 > >
14 > =======================================
15 >
16 > It just sits there at the > cursor. I think it needs something more to it, or
17
18 Looks like a syntax error with improperly nested quotations marks.
19
20 The last command in the sequence, which reads
21
22 tr q '"'"
23
24 try replacing that with
25
26 tr q '"'
27
28 (remove the final double quote)
29
30 W
31 --
32 "`Eddies,' said Ford, `in the space-time continuum.'
33 `Ah,' nodded Arthur, `is he? Is he?'"
34
35 - Arthur failing in his first lesson of galactic physics
36 in four years.
37 Sortir en Pantoufles: up 941 days, 15:00

Replies

Subject Author
Re: [gentoo-user] [OT] rrd to CSV Mick <michaelkintzios@×××××.com>