Linux grep, sed, awk commands (linux three musketeers)

 grep filters by

eg:

grep -i  -n "root" pwd.txt

Find the line containing root, case-insensitive, display line number

 

 

eg:

sed "2,3p" lu.com -n

Print the characters of lines 2 and 3

awk: follow-up learning, currently not needed

Guess you like

Origin blog.csdn.net/L1153413073/article/details/125614216