imagecrawler icon indicating copy to clipboard operation
imagecrawler copied to clipboard

[Known Issue] grep/egrep has different versions (GNU and BSD as I've encountered), need to support both.

Open dryruner opened this issue 9 years ago • 0 comments

  1. On ubuntu: $ grep -V; grep (GNU grep) 2.16 ... $ egrep -V; egrep (GNU grep) 2.16 ...
  2. On Mac OSX (BSD): $ grep -V; grep (BSD grep) 2.5.1-FreeBSD $ egrep -V; egrep (BSD grep) 2.5.1-FreeBSD

** What's the impact?

BSD greps and GNU greps has slightly different functionalities. GNU grep supports perl-like non greedy match: grep -P '"objURL":".?"' -o But it doesn't work with egrep [-P] '"objURL":".?"' -o (GNU egrep is different from BSD egrep)

BSD egrep supports this by: egrep '"objURL":".?"' -o But it doesn't work with grep -P '"objURL":".?"' -o (BSD grep doesn't support -P)

dryruner avatar Oct 17 '16 18:10 dryruner