Text Search & Editing

Awk

print first word of file

awk '{print $1}'



Grep

recusrse search (do not search lines starting with `#

grep -v '^#'

remove blank / witespace lines

grep .

print 2 words in file

grep -E 'word1|word2'

print 2 words in single line

REGEX - print character starting with number only .



Last updated