Display exact matches only with grep

前端 未结 8 962
半阙折子戏
半阙折子戏 2020-12-09 16:26

How can I display all jobs that ended OK only?

When I try the command below, it shows both OK and NOTOK since both have \"OK\"

ctmpsm -listall applic         


        
8条回答
  •  旧时难觅i
    2020-12-09 16:32

    try this:

    grep -P '^(tomcat!?)' tst1.txt
    

    It will search for specific word in txt file. Here we are trying to search word tomcat

提交回复
热议问题