All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server > command , shell script ,tool , crontab

grep , egrep , fgrep howto

(1/1)

golfreeze:
==show line number if found exact word "day" not "today" in file test.txt
grep -n -w "day" test.txt

golfreeze:
==found word="today" or "future" in file test.txt then show number also
grep -nw -i -e "today" -e "future" test.txt

golfreeze:
##grep without word "tomorrow" on file test.txt
grep -v "tomorrow" test.txt

golfreeze:
===fgrep = fix grep use with need finding word contain $ {} ? + . | ( )
fgrep "day$" test.txt

นำร่อง

[0] ดัชนีข้อความ

Go to full version