hfst-grep - =Search for PATTERN in each FILE or standard
input.
hfst-grep [OPTIONS...] PATTERN
[FILE...]
Search for PATTERN in each FILE or standard input. Pattern is, by
default, a Xerox regular expression (XRE). Example: hfst-grep 'h e l l o % w
o r l d' menu.h menu.c
- -E,
--extended-regexp
- PATTERN is an extended regular expression (ERE)
- -F,
--fixed-strings
- PATTERN is a set of newline-separated fixed strings
- -G,
--basic-regexp
- PATTERN is a basic regular expression (BRE)
- -P,
--perl-regexp
- PATTERN is a Perl regular expression
- -X,
--xerox-regexp
- PATTERN is a Xerox regulare expression
- -e,
--regexp=PATTERN
- use PATTERN for matching
- -f,
--file=FILE
- obtain PATTERN from FILE
- -I,
--ignore-case
- ignore case distinctions
- -w,
--word-regexp
- force PATTERN to match only whole words
- -x,
--line-regexp
- force PATTERN to match only whole lines
- -z,
--null-data
- a data line ends in 0 byte, not newline
- -m,
--max-count=NUM
- stop after NUM matches\n -b, --byte-offset print the byte
offset with output lines
- -n,
--line-number
- print line number with output lines
- --line-buffered
- flush output on every line
- -H,
--with-filename
- print the filename for each match
- -h,
--no-filename
- suppress the prefixing filename on output
- --label=LABEL
- print LABEL as filename for standard input
- -o,
--only-matching
- show only the part of a line matching PATTERN
- --binary-files=TYPE
- assume that binary files are TYPE; TYPE is `binary', `text', or
`without-match'
- -a, --text
- equivalent to --binary-files=text
- -d,
--directories=ACTION
- how to handle directories; ACTION is `read', `recurse', or `skip'
- -D,
--devices=ACTION
- how to handle devices, FIFOs and sockets; ACTION is `read' or `skip'
- -R, -r,
--recursive
- equivalent to --directories=recurse
- --include=FILE_PATTERN
- search only files that match FILE_PATTERN
- --exclude=FILE_PATTERN
- skip files and directories matching FILE_PATTERN
- --exclude-from=FILE
- skip files matching any file pattern from FILE
- --exclude-dir=PATTERN
- directories that match PATTERN will be skipped
- -L,
--files-without-match
- print only names of FILEs containing no match
- -l,
--files-with-matches
- print only names of FILEs containing matches
- -c, --count
- print only a count of matching lines per FILE
- -T,
--initial-tab
- make tabs line up (if needed)
- -Z, --null
- print 0 byte after FILE name
Report bugs to <hfst-bugs@helsinki.fi> or directly to our
bug tracker at: <https://github.com/hfst/hfst/issues> hfst-grep home
page: <https://kitwiki.csc.fi/twiki/bin/view/KitWiki//HfstGrep>
General help using HFST software:
<https://kitwiki.csc.fi/twiki/bin/view/KitWiki//HfstHome>
Copyright © 2017 University of Helsinki, License GPLv3: GNU
GPL version 3 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.