hi ,i have to grep a series say 98782 from a file containing series how can i grep it
i have to grep a series say 98782 from a group by series in a file ,plz tell me how can i grep the series.
|
Hi,
Could you give an example of what you want? The above description is not very clear. |
Even better - show us what you have attempted, and why you need help.
|
grep "98782" <filename>
|
example
there is a file of mobile numbers having lacs of mobile number
i have to grep the count of a particular series say 9872 from that file problem is that when i am using grep "9872" its works but it is searching the numbers like 9156239872 9198720002 As it find the series 9872 at last and middle. I have to find only those number start with series "9872" 9872 may be at middle or end but i have to find numbers start with 9872. |
Hi,
As ajeetsinghraina guessed correctly, you can use grep to do that. grep "^9872" filename should do the trick. The ^ tells grep to only look for entries that start with the search pattern. Hope this helps. |
grep ^9872 <filename>
Edit: druuna beat on this. |
All times are GMT -5. The time now is 02:44 PM. |