On 13 April 2013 16:05, Wendy Lin <[email protected]> wrote: > Dear ast-devel, > > the grep -C from the latest ast-ksh (2013-04-09) does not work > compared to GNU grep 2.14 > > In GNU grep 2.14 I get this for the context option: > > seq 200 >"测试文件" > ksh -c '/usr/bin/grep --context=2 51 <"测试文件"' > 49 > 50 > 51 > 52 > 53 > -- > 149 > 150 > 151 > 152 > 153 > > But I get this from grep from ast-ksh for the context option: > > ksh -c 'builtin grep ; grep --context=2 51 <"测试文件"' > 51 > 151 > > Is this a bug or feature? > > AFAIK the -C option in ast-ksh grep should work like this: > -C 2 gives 2 lines of context before and after the match > -C ,2 gives only 2 lines of context after the match > -C 2, gives only 2 lines of contetxt before the match > > optionally AST grep should support these two long options for GNU grep > compatibility: > > --before-context=NUM print NUM lines of leading context > --after-context=NUM print NUM lines of trailing context > > What do you think?
Was the bug report received? > > Wendy Wendy _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
