[Bug 3091] Nonportable tool usage in scripts

Rich Felker dalias at aerifal.cx
Tue Feb 8 23:56:12 UTC 2011


On Tue, Feb 08, 2011 at 09:49:21PM +0100, Denys Vlasenko wrote:
> > > > Also, the ? character is not special in POSIX BRE, and \? is not a conformant
> > > > substitute. The portable solution is to use egrep instead of grep.
> > > 
> > > Great, can you point out where exactly is that ?
> > 
> > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
> > 
> > The ? character is completely missing from all text on BRE. See 9.5
> > Regular Expression Grammar for the most formal description of what is
> > a valid BRE.
> 
> I meant, where _in scripts_ do we use '?'

Oh, sorry. In scripts/mkconfigs, there are two occurrances of:

grep '^#\? \?CONFIG_' "$config" \

they should read:

egrep '^#? ?CONFIG_' "$config" \

I thought I had attached a patch to that effect, but perhaps I forgot
the patch...

Rich


More information about the busybox mailing list