bug#56888: 'echo message | grep []' is affected by files in local directory when using bracket

2022-08-02 Thread H3rm1t
Hi: I use grep to search string in a message like this. > [root@office tmp]# echo "axyz" | grep [abcd]xyz > axyz > [root@office tmp]# echo "cxyz" | grep [abcd]xyz > cxyz > [root@office tmp]# echo "bxyz" | grep [abcd]xyz > bxyz > [root@office tmp]# echo "dxyz" | grep [abcd]xyz > dxyz > [root@off

bug#56888: 'echo message | grep []' is affected by files in local directory when using bracket

2022-08-04 Thread H3rm1t
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. H