First page Back Continue Last page Overview

 

grep

 
  • Prints lines of files where a pattern is matched

    • $ grep john /etc/passwd
    • john:x:500:500:John Doe:/home/john:/bin/bash
  • Also used as filter in pipelines

    • ls | grep .c
  • Uses regular expressions

    • grep '[0-9][A-Z]\{3\}[0-9]\{3\}' cars