Grepper: Difference between revisions
Jump to navigation
Jump to search
Line 25: | Line 25: | ||
=Installation= | =Installation= | ||
Program is a single c++ file that can be downloaded | Program is a single c++ file that can be downloaded [http://popgen.dk/software/download/grepper.cpp] |
Revision as of 18:58, 15 March 2014
Small usefull command line program called grepper which is a usefull to complement POSIX grep.
The idea is that you have a file that can be 'whatever' delimited and then you want to extract entire rows, but you only want to do the search in specific columns.
- You supply a file containing all the keys that will be searched for in the datafile. The program will only do a single pass of the datafile.
- You specify which column to use for the search.
The program supports the following options which should make it somewhat similar to grep
- -i don't care about cases (capital letter vs small letter)
- -w seach for whole words
- -v do complement
Brief overview
usage: grepper [OPTION] -k keyfile datafile.gz usage: gunzip -c datafile.gz | grepper [OPTION] -k keyfile options: -c [int]: which column to use for grepping (1 indexed) -d [char] delimitor for the datafile -w search for whole words (similar to grep -w option) -v complement grep (similar to grep -v option) -i ignore case (similar to grep -i option)
Installation
Program is a single c++ file that can be downloaded [1]