This is how we can use the power of grep command to find
the particular word in the file.
the particular word in the file.
Syntax is:
grep [options] PATTERN [FILE
Example:If I wanted to find the word "Name" in the file info.txt we can form the grep command as belowgrep Name ./info.txt
If you want to know the line number just add the option -n.
The above command is modified as below.grep -n Name ./info.txt
No comments:
Post a Comment