Grep searches input files for lines containing a match to a given pattern list.
cat /usr/share/dict/words | grep "Ind.*"
Output
Ind
Indanthrene
Indecidua
Independista
India
cat /usr/share/dict/words | grep ".*age$"
Output
wreathage
wreckage
xylophage
yardage
yokeage
cat /usr/share/dict/words | grep "q." | grep -v "qu"
Output
Iraqi
Iraqian
Louiqa
miqra
qasida
qere
ifconfig | grep "en[0-9]" -A 4
Output
en0: flags=xxxx<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu xxxx ether xx:bf:xb:ex:xd:xx inetx fexx::xcfx:cxbx:xxbx:bx%enx prefixlen xx secured scopeid xxx inet xxx.xx.x.xxx netmask xxffffffxx broadcast xxx.xx.x.xxx ndx options=xxx<PERFORMNUD,DAD> en1: flags=xxx<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu xxxx options=xx<TSOx,TSOx> ether xa:xx:xd:xx:xc:bx media: autoselect <full-duplex> status: inactive
grep -HRi "json" *
Output
web/problems/bookmark.js: dataType: 'json', web/tag-search.js: dataType: 'json',
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Valid phone number | 150 |
|
22:24 | |
Lines in a given range | 200 |
|
27:49 | |
Remove Punctuations | 250 |
|
12:58 | |
Transform CSV | 300 |
|
19:07 |