How to grep for case insensitive string in a file?

后端 未结 2 490
时光说笑
时光说笑 2020-12-03 06:18

I have a file file1 which ends with Success... OR success...

I want to grep for the word success in

2条回答
  •  离开以前
    2020-12-03 07:05

    You can use the -i flag which makes your pattern case insensitive:

    grep -iF "success..." file1
    

    Also, there is no need for cat. grep takes a file with the syntax grep . I also used the -F flag to search for a fixed string to avoid escaping the ellipsis.

提交回复
热议问题