Forrest logo
back to the grep tool

grep:ai:48b1a

find mutiple strings
$ grep 'string1\|string2\|string3' ${filename}
try on your machine

Searches for multiple strings (string1, string2, string3) in a file named file.txt using grep command

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • find mutiple strings?
back to the grep tool