Grep Command

Grep command is the linux tool which is used to find a particular string out from the complex files in the linux filesystem

  1. Grep contents matching specific word

cat words.txt | grep "Hello"
  1. Grep (With regex)

grep -E '^.{<CHAR_LENGTH>}$' words.txt > filtered_words.txt

Last updated