Searching and Processing Text
Searching Text
grep
grep file file-list.txt
file1.txt
file2.txt
file3.txt
# Output higlights the matching text (colors enabled in the shell)
# To search for lines that DO NOT match text
grep -v 1 file-list.txt
file2.txt
file3.txt
grep -v root /etc/passwd | less
# Check the grep man page
man grep



sort

uniq
wc
Manipulating Text
sed



awk

tr


Last updated