Tag Archives: regex

How to make grep highlight the keyword

By default, grep does not highlight the keyword or the search term. Making grep highlighting the search term can make the visibility of the keyword more obvious if it hide in between the words.

How to search in compressed file

This is the third post talking about compressed files. This time, we will look into how to search within the compressed file, without decompressing it.

vim – basics of search and replace in substitute command mode

When cleaning up some config file with hundreds of lines, browsing up and down just to find the key word can be eye dazzling, in the pungent way.
The good thing about vim is, it is able to find any text you want using the “Search” command (/) in the “Normal” mode (Esc twice [...]

sed – search & replace with variables within bash

sed is extremely helpful in search & replace text, in file & variables. Often we need to construct a list of strings together with variables. But the normal usage of sed :

e.g.
sed -e ’s/text-to-search/string-to-replace-$variable-name/g’

will only replace the variable $variable-name literally rather then the pre-define value. After meddling with a few more stuff, the problem lies [...]

-->
Improve the web with Nofollow Reciprocity.