Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] grep command

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Kuriakose, Cinu Cheriyamoozhiyil" <Cinu(dot)Kuriakose(at)in(dot)unisys(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: [HACKERS] grep command
Date: 2007-10-29 14:37:29
Message-ID: 4725F029.3010101@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-hackers
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
>
>   

In response to

  • grep command at 2007-10-29 14:15:30 from Kuriakose, Cinu Cheriyamoozhiyil

Responses

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2007-10-29 14:56:37
Subject: Re: [HACKERS] WAL archiving idle database
Previous:From: Kuriakose, Cinu CheriyamoozhiyilDate: 2007-10-29 14:15:30
Subject: grep command

pgsql-admin by date

Next:From: Jeff LarsenDate: 2007-10-29 17:39:03
Subject: Indexes for Foreign Keys?
Previous:From: Kuriakose, Cinu CheriyamoozhiyilDate: 2007-10-29 14:15:30
Subject: grep command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group