You should be able to do this with GREP
utility, using the -n
option, which will prefix each line of output with the line number of the input file.
If this is your input file:
Hello, World!
Name Age Place
Abc 26 CO
Def 27 CA
Ghi 45 MH
Jkl 32 SD
Then:
$ grep -n "2 " inputFile.text
6: Jkl 32 SD
Here you can see that the pattern you are looking for can be found on line 6.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…