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 |