tools4j / unix4j

An implementation of Unix command line tools in Java.
unix4j.org
MIT License
236 stars 43 forks source link

GrepOption.F.i is not seems to be working #59

Closed yanyige closed 5 years ago

yanyige commented 5 years ago

Hi, all: When i use List lines = Unix4j.grep(Grep.Options.i.F, target, file). toLineList(); it seems to return nothing to me, while Grep.Options.i.n/while Grep.Options.n.F works well. It seems to occur problem when -F used with i

terzerm commented 5 years ago

Thanks for reporting this. I will check and try to reproduce. Btw it is best practice to always report bugs with a unit test that reproduces the problem ;-)

terzerm commented 5 years ago

Could not be reproduced. Seems to be working fine, see GrepTest.testFixedStringWithIgnoreCase()

@yanyige Check your path argument, grep may be looking in the wrong directory and not find the file. E.g. try with absolute path.