16 Jun


Replace this '@(\w+)'

15 May

You can use locate to find files with name that matches a said regexp…


locate -i -r '\.jpg\$'

31 May

Print the contents of a file from a given regular expression to another


sed -n '/start/,/end/ p' file


This will print the contents of the ‘file’ from the line that matches /start/ until the line that matches /end/

01 Oct

Print a file until a regular expression is matched.


cat file.txt | perl -pe "exit if(/Thats all/)"