Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. stupidmatt

    find string & grab next 10 lines...

    awk '/\$D=/ {c=1;next}c-->0 {print $2}' <file> works a treat thanks matt
  2. stupidmatt

    find string &amp; grab next 10 lines...

    Please excuse my ignorance, new to awk. Is there a way to modify this to only print from a line after the search string has been found I have a file like this ##$D= (0-31) 0 2 3 4 5 And I would like to extract the value 2. doing awk '/\$D=/ {c=2}c-->0 {print $2}' <file> gives me: (0-31) 2...

Part and Inventory Search

Back
Top