Other Options in Grep Command
In the previous post i have discussed 2 options in the grep command. In this post i am going to discuss about another 2 important options that are available in the grep command.
Exact Search
Command : grep -w
Usage : Will search for the exact match
Syntax : grep -w string filename
Example : grep -w too word.txt
Working: The above command will search the word too in an exact manner. If this option is not used the command will give the output of the string which has "too" as sub string even.
Count
Command : grep -c
Usage : Will count the number of times string occur
Syntax: grep -c string filename
Example : grep -c apple fruits.txt
So far i have discussed the most important grep command options. I don't like to discuss other commands and confuse. If you need so ping me via comment. ill explain you other commands
Kindly bare me for posting articles too late.
Have a great day..:)
Regards
Praveen Kumar Rajendran
Chennai
0 comments:
Post a Comment