[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56888: 'echo message | grep ' is affected by files in local direct
bug#56888: 'echo message | grep ' is affected by files in local directory when using bracket
Thu, 4 Aug 2022 16:30:25 +0800
Thank you for your answer
it confused me and I didn't get grep's aguments in this case became a flie
name but not a string.
Finally I recognize 'bash' do some regex search before 'grep' execute.
'bash' searching costs lots of time when number of files is big.
Yes it's not a bug, please close it.
Have a nice day.
Jim Meyering <email@example.com> 于2022年8月3日周三 21:52写道：
> tags 56888 + notabug
> close 56888
> On Tue, Aug 2, 2022 at 9:08 AM Carlo Arenas <firstname.lastname@example.org> wrote:
> > This behaviour is expected and described in the manual (albeit it
> > might be a good candidate for a FAQ) :
> > https://www.gnu.org/software/grep/manual/grep.html#Usage
> > Even before grep gets to see the expression, the shell would try to
> > match it and expand it as needed, which is obviously not what you want
> > for your usecase and why it would be better if you quote it.
> > time echo "axyz" | grep '[abcd]xyz'
> > should behave as you expect, regardless of what the current directory
> Thanks. By the above, I've marked this as "not a bug" and closed the
> auto-generated ticket.