Messages in this thread | | | Date | Fri, 10 Jul 2009 15:55:30 +0800 | From | Amerigo Wang <> | Subject | Re: [PATCH] kconfig: simplification of scripts/extract-ikconfig |
| |
On Thu, Jul 09, 2009 at 10:26:51AM +0200, Dick Streefland wrote: >On Thursday 2009-07-09 10:38, Amerigo Wang wrote: >| I appologize for my delay, I totally missed this thread, sorry. >| >| I just tested it, it works! So, >| >| Tested-by: WANG Cong <xiyou.wangcong@gmail.com> > >Great, thanks. > >| But, I still don't understand the behavior of 'grep -abo', >| please try the following commands: >| >| echo -e '\x01\x02\x03\x04' > test.bin >| od -x test.bin >| tr $'\x01\x02\x03\x04' '1234' < test.bin | grep -abo '4' >| >| Am I missing something here?? > >The output with grep-2.5.3 is 3:4, which means that the string "4" was >found at offset 3 (0-based). With grep-2.5.1, you get 0:4, which means >that the line containing the string "4" has offset 0. The "tr" commands >in the script ensure that the patterns we are looking for are always at >the start of a line, so that it doesn't matter which version of grep is >installed.
Hmm, I see, it is really a _big_ change. :)
Have you checked other version of grep? I mean lower version, of course, does your script work with them too?
Thank you!
| |