Logo
Web01
Ch4os1@web01:~/commands/grep
← View all bash commands

grep

grep - Search for patterns in files.

Examples

grep 'pattern' /path/to/file.txt
              

Search for 'pattern' in 'file.txt'.

grep 'pattern' /path/to/dontrunme.sh
              

Search for 'pattern' in 'dontrunme.sh'.

Notes

This command affects only the current shell session.