From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MNqn6-0005RA-Mb for garchives@archives.gentoo.org; Mon, 06 Jul 2009 16:11:40 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 39807E02BC; Mon, 6 Jul 2009 16:11:39 +0000 (UTC) Received: from Princeton.EDU (postoffice03.Princeton.EDU [128.112.131.174]) by pigeon.gentoo.org (Postfix) with ESMTP id 12FF6E02BC for ; Mon, 6 Jul 2009 16:11:39 +0000 (UTC) Received: from smtpserver1.Princeton.EDU (smtpserver1.Princeton.EDU [128.112.129.65]) by Princeton.EDU (8.13.8/8.13.8) with ESMTP id n66GBcAg021818 for ; Mon, 6 Jul 2009 12:11:38 -0400 (EDT) Received: from sep.dynalias.net (fez.Princeton.EDU [128.112.129.190]) (authenticated bits=0) by smtpserver1.Princeton.EDU (8.12.9/8.12.9) with ESMTP id n66GBb2s016197 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Mon, 6 Jul 2009 12:11:38 -0400 (EDT) Received: by sep.dynalias.net (Postfix, from userid 1001) id 220811440F; Mon, 6 Jul 2009 12:15:14 -0400 (EDT) Date: Mon, 6 Jul 2009 12:15:14 -0400 From: Willie Wong To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [OT] rrd to CSV Message-ID: <20090706161514.GA3595@princeton.edu> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <200907041636.51868.michaelkintzios@gmail.com> <642958cc0907040923n5592c393t73b2df7196e1ec8d@mail.gmail.com> <200907052307.33628.michaelkintzios@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907052307.33628.michaelkintzios@gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Archives-Salt: ceaf2e16-57f8-48ed-9dc0-8e9558097883 X-Archives-Hash: 83ecd7ba11733189ea1e35ad685cb46f On Sun, Jul 05, 2009 at 11:07:23PM +0100, Penguin Lover Mick squawked: > > from Cacti forums): > > | grep -v NaN | grep '' | tr e ' ' \ > > | awk {'print "Q"$2"qcq"$3"qcq"$9"Q"'} \ > > | tr Q '"' | tr c ',' | tr q '"'" > > > > Haven't tested it, but looks like it should work. > > Hmm, I don't think it gets anywhere: > ======================================= > cat test.xml | grep -v NaN | grep '' | tr e ' ' | awk > {'print "Q"$2"qcq"$3"qcq"$9"Q"'} | tr Q '"' | tr c ',' | tr q '"'" > test.csv > > > ======================================= > > It just sits there at the > cursor. I think it needs something more to it, or Looks like a syntax error with improperly nested quotations marks. The last command in the sequence, which reads tr q '"'" try replacing that with tr q '"' (remove the final double quote) W -- "`Eddies,' said Ford, `in the space-time continuum.' `Ah,' nodded Arthur, `is he? Is he?'" - Arthur failing in his first lesson of galactic physics in four years. Sortir en Pantoufles: up 941 days, 15:00