Friday, October 9, 2015

Notepad++ and a "grep" like feature

I was needing to pull a bunch of lines out of a huge file. Over 200,000 records long, and I didnt want to resort to pushing it over to one of my linux servers just to grep the lines out, and then pull them back in to use the output selectively.

So, I found out this neat little sequence using the latest version of Notepad++

  1. Open the document
  2. hit Ctrl-F 
  3. In this find window, go to the "Mark" tab
  4. make sure the "Bookmark" is checked
  5. place what you are looking for in the "Find what" field
  6. Mark all
  7. Now close this and go up to the search menu
  8. Do a search  "Bookmark"
  9. in here are options to strip out all bookmarks or copy all bookmarks

For my use case I needed to copy all the bookmarks and paste them into a fresh document.