User Tools

Site Tools


grep_usage

This is an old revision of the document!


wordscapes

% grep -i "^[slev][slev][slev][slev]s$" /usr/share/dict/american-english 
elves
sells

repeat previous character N times

Use (character){N} and call grep with -E

 % grep -Ei "^[enrich]i([enrich]){2}e$" /usr/share/dict/american-english
Circe
niche
niece

is equivalent to

 % grep -i "^[enrich]i[enrich][enrich]e$" /usr/share/dict/american-english
Circe
niche
niece
grep_usage.1614393503.txt.gz · Last modified: 2021/02/27 02:38 by raju