a_file
-------
boot
book
booze
machine
boots
bungie
bark
aardvark
broken$tuff
robots
grep "boo" a_file
boot
book
booze
boots
grep -n "boo" a_file
1:boot
2:book
3:booze
5:boots
grep -vn "boo" a_file
4:machine
6:bungie
7:bark
8:aaradvark
9:robots
grep -c "boo" a_file
4
grep -l "boo" *
Prints out the file names
grep -i "BOO" a_file
ignores case
grep -x "boo" a_file
exact matches
echo "i want to search for this text" > search
grep -f search a_file
-------
boot
book
booze
machine
boots
bungie
bark
aardvark
broken$tuff
robots
grep "boo" a_file
boot
book
booze
boots
grep -n "boo" a_file
1:boot
2:book
3:booze
5:boots
grep -vn "boo" a_file
4:machine
6:bungie
7:bark
8:aaradvark
9:robots
grep -c "boo" a_file
4
grep -l "boo" *
Prints out the file names
grep -i "BOO" a_file
ignores case
grep -x "boo" a_file
exact matches
echo "i want to search for this text" > search
grep -f search a_file
Comments
Post a Comment