Search Suggest

command to find keyword from file

grep command to find keyword from file
# cat test
192.168.0.1
192.168.0.2
192.168.0.3

Syntax: grep “pattern”  file_name
# grep "192.168.0.1" test
192.168.0.1

Awk command to find keyword from file
Syntax: awk '/pattern/' file_name

# awk '/192.168.0.3/' test
192.168.0.3

Find Multiple keyword from file

# awk '/192.168.0.3|192.168.0.1/' test
192.168.0.1

192.168.0.3

Đăng nhận xét