Grep match only before “:”

前端 未结 3 1613

Hello How can I grep only match before : mark?

If I run grep test1 file, it shows all three lines.

test1:x:29688:test1,test2
te         


        
3条回答
提交回复
热议问题