Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: getting mul...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 2188 of 2241
Post > Topic >>

Re: getting multiple line matches to single line for gcc --version

by gazelle@[EMAIL PROTECTED] (Kenny McCormack) Mar 13, 2008 at 04:39 PM

In article
<225d624e-bece-45bf-afcf-afc4dac25760@[EMAIL PROTECTED]
>,
Jeff  <jeep@[EMAIL PROTECTED]
> wrote:
>Im trying to use awk to extract the version of gcc in a makefile,
>but for now Im trying it on the command line to get it to work.
>
>Since the output of gcc --version is multiline, Im getting $3 of every
>line:
>
>4.1.2
>2006
>free
>even
>
>for this:  gcc --version | awk '{print $3}'

    gcc --version | awk '{print $3;exit}'




 4 Posts in Topic:
getting multiple line matches to single line for gcc --version
Jeff <jeep@[EMAIL PROT  2008-03-13 09:35:48 
Re: getting multiple line matches to single line for gcc --versi
gazelle@[EMAIL PROTECTED]  2008-03-13 16:39:53 
Re: getting multiple line matches to single line for gcc --versi
Ralf Damaschke <rwspam  2008-03-13 17:03:48 
Re: getting multiple line matches to single line for gcc --versi
Danijel Tasov <dtasov@  2008-03-13 22:17:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 6:13:18 CDT 2008.