Linux Question, Grep related.
Is there anyway to search a text file for a particular word and output where the word is located in the file including the particular line it resides on?
i.e cat myfile | grep -i computer - would search myfile for the word computer but I also want the line it appears on to aid with text editing I don't use Vi or Vim I am currently using Nano.
Many Thanks
i.e cat myfile | grep -i computer - would search myfile for the word computer but I also want the line it appears on to aid with text editing I don't use Vi or Vim I am currently using Nano.
Many Thanks
Microsoft's strategy to conquer the I.T industry
" Embrace, evolve, extinguish "
" Embrace, evolve, extinguish "
Comments
-
Zartanasaurus Member Posts: 2,008 ■■■■■■■■■□grep -n prints line numbers.Currently reading:
IPSec VPN Design 44%
Mastering VMWare vSphere 5 42.8% -
ally_uk Member Posts: 1,145 ■■■■□□□□□□Thank youMicrosoft's strategy to conquer the I.T industry
" Embrace, evolve, extinguish "