> But in a sense the -o and the * are conflicting: the [1234567890]* > will match anything, also zero digits, and the -o should then print > all these occurrences of zero digits...
grep-5.2.3 does not print empty matches when -o is specified. This behaviour sounds reasonable to me, even though it is inconsistent with general matching: -- % echo 'abc1234abc' | ./grep 'z*' abc1234abc % echo 'abc1234abc' | ./grep -o 'z*' % -- As you can see, the same pattern produced a match without options, and didn't produce any matches with -o. It is not clear to me at this point weather to treat this as a bug or a feature. One one hand, empty matches are usually representative of errors in the pattern, and printing every one of them with -o will clutter the output. On the other hand, this makes the behaviour of -o radically different from without it, especially when searching multiple files and expecting the names of the matching files to be printed. What do others think? Cheers, TAA ----------------------------------------------------- Tony Abou-Assaleh Email: [EMAIL PROTECTED] Web site: http://tony.abou-assaleh.net ----------------------[THE END]----------------------