Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 5A35D9FB866; Mon, 29 Oct 2007 11:37:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 77671-06; Mon, 29 Oct 2007 11:37:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.121]) by postgresql.org (Postfix) with ESMTP id 5E4FE9F9316; Mon, 29 Oct 2007 11:37:31 -0300 (ADT) Received: from [192.168.10.103] (really [75.189.141.184]) by cdptpa-omta04.mail.rr.com with ESMTP id <20071029143729.LFEF2011.cdptpa-omta04.mail.rr.com@[192.168.10.103]>; Mon, 29 Oct 2007 14:37:29 +0000 Message-ID: <4725F029.3010101@dunslane.net> Date: Mon, 29 Oct 2007 10:37:29 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20070719 Fedora/1.0.9-2.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: "Kuriakose, Cinu Cheriyamoozhiyil" CC: pgsql-hackers@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [HACKERS] grep command References: <28916.1189900143@sss.pgh.pa.us> <29644.1189904237@sss.pgh.pa.us> <82wst6ulx3.fsf@mid.bfk.de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200710/289 X-Sequence-Number: 27203 Leaving aside the question of why one might want to do this, Unix 101 should show you many ways to do it. For example, sed -n -e 's/.*PG_VERSION /PG_VERSION /p' -e /PG_VERSION/q config.log Please don't cross-post questions like this, especially when it's not really a PostgreSQL question at all. cheers andrew Kuriakose, Cinu Cheriyamoozhiyil wrote: > Hi All, > > I am giving the command > > cat config.log|grep -w 'PG_VERSION' > > Which gives the following Output: > > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > | #define PG_VERSION "8.3beta2" > #define PG_VERSION "8.3beta2" > > But the output that I would require is > > PG_VERSION "8.3beta2" that should occur only once, can anyone please > tell me the command to get this output. > > Thanks in advance > > Regards > Cinu Kuriakose > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > >