grep - linux

Grep using Perl regex syntax

# Use the -P tag, note the quotations
echo "__version__ = 3.4.5" | grep -oP '[0-9]\.[0-9]\.[0-9]'
3.4.5
        

Common

UsageDescription
grep -r "pattern" /path/to/dirSearch all files in directory for pattern (-r recursive)
find /dir -type d -name "*dir_name*" -printSearch for directory names (not grep but w/e)