Friday, 12 June 2015

Search for '=' separated lines with RegEx

Find:
^([^=]*)=(.*)$

For mirror replacing what's on the left hand side to the right hand side

Replace with:
\1=#{\1}


Comment: \0 in the hole result!

Wednesday, 10 June 2015

Search strings using grep in Linux

grep word_to_look_for file_name.txt --context=10

-n if you want to see line numbers.



Search phrase in
grep -Ri "phrase to search for" /directory/to/search/in

-R recursively
-i ignore case


To search for a file name recursevly:

find <path> -name *FileName*
e.g.
find . -name pipes.txt