Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id ED3E39F9C31 for ; Mon, 29 Oct 2007 15:59:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 36769-09 for ; Mon, 29 Oct 2007 15:58:55 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by postgresql.org (Postfix) with ESMTP id E94E99F9A02 for ; Mon, 29 Oct 2007 15:58:56 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id u77so3963843pyb for ; Mon, 29 Oct 2007 11:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=PAKHrDni7H+2Apysh+e0Xfs7P1LrRpUxh2fZAtuSLqc=; b=hUdT/vXykRTeCG2M/H+8OXnFc0FrDDwp0gwjLnQMnR3XnqqMf9btqx9s66bxJ9BlzjYyBaoMDmTwgYv7Wqhbiihxq2Oa2dzOgVd4Wg/L68JLxAjD7XPIyqkEw9ajvnm1XLzV59K5BQkNpc/qbjxlHbU0LD1FpF5/79iFXjYnhLc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Ep8MZ6D5Os13SIONGbmM9djy+Y9qVZgMTrXSyGnPfO9shasN4WnzF6Jyj9CjCuiZKZNw3N62+w4bqqoifkSoi/x0N5EriI8eZDpUyOlXyZDgy2q3xP/7b1YlHzPjrFTZp1PnXZ2g3JqnC5nFo7bc9WaTzoMkboLIKBKnaYXXoUo= Received: by 10.65.155.19 with SMTP id h19mr13441626qbo.1193684330518; Mon, 29 Oct 2007 11:58:50 -0700 (PDT) Received: by 10.64.242.15 with HTTP; Mon, 29 Oct 2007 11:58:50 -0700 (PDT) Message-ID: <8078a1730710291158p6c643f03ycdd5f080ba816681@mail.gmail.com> Date: Mon, 29 Oct 2007 11:58:50 -0700 From: "Medi Montaseri" To: "Andrew Dunstan" Subject: Re: [HACKERS] grep command Cc: "Kuriakose, Cinu Cheriyamoozhiyil" , pgsql-hackers@postgresql.org, pgsql-admin@postgresql.org In-Reply-To: <4725F029.3010101@dunslane.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4393_28705540.1193684330518" References: <28916.1189900143@sss.pgh.pa.us> <29644.1189904237@sss.pgh.pa.us> <82wst6ulx3.fsf@mid.bfk.de> <4725F029.3010101@dunslane.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/296 X-Sequence-Number: 27210 ------=_Part_4393_28705540.1193684330518 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Or ... ask the application not the OS .... psql> select version() ; Cheers Medi On 10/29/07, Andrew Dunstan wrote: > > > 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 > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > ------=_Part_4393_28705540.1193684330518 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Or ... ask the application not the OS  ....

psql> select version() ;

Cheers
Medi

On 10/29/07, Andrew Dunstan < andrew@dunslane.net> wrote:

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
>
>

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

------=_Part_4393_28705540.1193684330518--