Unix/Linux Forum: using cut and awk commands - Unix/Linux Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

using cut and awk commands Rate Topic: -----

#1 User is offline   peru Icon

  • User Level: 1/10
  • Pip
  • Group: Members
  • Posts: 18
  • Joined: 20-August 08

Posted 15 September 2008 - 09:32 AM

hi,
The following line is contained in a file
YES:pmd:-start,0x7fffffffffffff1f,0x0000000000000000,{CCB}.*:NO:60:NOPAUSE:

I would like to extract only the following:
0x7fffffffffffff1f,0x0000000000000000,{CCB}.*

using cut and awk commands

Regards
Peru
0

#2 User is offline   eggi Icon

  • User Level: 6/10
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 311
  • Joined: 25-November 07
  • Location:Grayslake, IL USA

Posted 17 September 2008 - 03:31 AM

Hey There,

If you're stuck on using awk "and" cut, this could do it:

awk -F"," '{print $2 "," $3 "," $4}' FILENAME|cut -f1 -d:
0x7fffffffffffff1f,0x0000000000000000,{CCB}.*


Best wishes,

Mike
The greatest viral marketing idea of all time, get your copy of this Free Report now!
----
Linux Tips, Trick and Advice -- The Linux and Unix Menagerie
0

#3 User is offline   peru Icon

  • User Level: 1/10
  • Pip
  • Group: Members
  • Posts: 18
  • Joined: 20-August 08

Posted 17 September 2008 - 06:12 AM

thanks Mike... :)
0

#4 User is offline   eggi Icon

  • User Level: 6/10
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 311
  • Joined: 25-November 07
  • Location:Grayslake, IL USA

Posted 18 September 2008 - 02:21 AM

Glad to help out :)

, Mike
The greatest viral marketing idea of all time, get your copy of this Free Report now!
----
Linux Tips, Trick and Advice -- The Linux and Unix Menagerie
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Cambridge Plus :: Cambridgeshire Steam Rally :: Prototype Electronic Assembly :: Classic Bike Piston Rings
Unix Man Pages / Linux Man Pages :: HiFi Forum :: A14 Comments :: UNIX/Linux Forum Archives