This extension for efind makes it possible to filter text files by their content.
Tests if the text file contains query. Returns the line number of the first occurrence.
$ efind . 'text_contains("foo") or text_contains("bar")'
Tests if the first limit lines of the text file contain query. Returns the line number of the first occurrence.
$ efind . 'head_contains("baz", 20)'
Tests if the last limit lines of the text file contain query. Returns the line number of the first occurrence.
$ efind . 'tail_contains("foobar", 20)'
Tests if the text file contains a line starting with query. Returns the line number of the first occurrence.
$ efind . 'text_startswith("foo") or text_contains("bar")'
Tests if the first limit lines of text file contain a line starting with query. Returns the line number of the first occurrence.
$ efind . 'head_startswith("baz", 20)'
Tests if the last limit lines of text file contain a line starting with query. Returns the line number of the first occurrence.
$ efind . 'tail_startswith("foobar", 20)'
Tests if the text file contains a line ending with query. Returns the line number of the first occurrence.
$ efind . 'text_endswith("foo") or text_contains("bar")'
Tests if the first limit lines of text file contain a line ending with query. Returns the line number of the first occurrence.
$ efind . 'head_endswith("baz", 20)'
Tests if the last limit lines of text file contain a line ending with query. Returns the line number of the first occurrence.
$ efind . 'tail_endswith("foobar", 20)'
Returns the number of lines.
$ efind . 'count_lines()>100'
Returns the number of lines containing query.
$ efind . 'count_match("foo")=5'
Returns the number of lines starting with query.
$ efind . 'count_prefix("bar")>=17'
Returns the number of lines ending with query.
$ efind . 'count_suffix("baz")=100'
Ensure that GNU Make and GCC (or Clang) is installed on your system. Then run
$ make
$ sudo make install