Find the answer to your Linux question:
Results 1 to 3 of 3
I'm uising grep okay to filter out certain lines of a document but how can I use it to filter out each individual line to only select a certain word ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2010
    Posts
    122

    using grep to select segements of a line


    I'm uising grep okay to filter out certain lines of a document but how can I use it to filter out each individual line to only select a certain word on that line? Thanks.

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,399
    Use the -o option.
    You must always face the curtain with a bow.

  3. #3
    Linux Newbie
    Join Date
    Dec 2010
    Posts
    122
    Thanks Irithori.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •