0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

fgrep

Last updated at Posted at 2024-01-22

fgrepは、grep -Fと同じ。パターン文字列をただの文字列として扱う
-F, --fixed-strings, --fixed-regexp Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. (-F is specified by POSIX, --fixed-regexp is an obsoleted alias, please do not use it in new scripts.)

[linuxstudy@xxxx ~]$ cat find.txt 
abcdef
abc[^a]ef
[linuxstudy@xxxx ~]$ fgrep abc[^a]ef find.txt  //abc[^a]efという文字列を検索
abc[^a]ef
[linuxstudy@xxxx ~]$ grep abc[^a]ef find.txt   //正規表現abc[^a]efを検索
abcdef
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?