Scripting

Grep recursively through subdirectories

grep recursively through subdirectories for files that match a specific pattern: grep -l -r –include=*.doc regex * The equivalent command unsing find: find . -name ‘*.doc’ -exec grep -l regex \{\} \; The option after grep is the lowercase letter L, not the number 1). Remove the -l to see the actual matches instead of […]

Read More
Linux

regex –make option

Get a ready regex The –make option is described by its author as “a remedy for headaches.” It outputs a regexp for one of several common patterns that are given as arguments, as listed in table. List of ready regexps available in txt2regex Argument Description date This argument matches dates in mm/dd/yyyy format, from 00/00/0000 […]

Read More