zone "adm.test.com" {
abc
test1.db
}
zone "test.com" {
xyz
test2.db
}
zone "1.test.com.sg" {
1abc
test3.db
}
zone "3.test.com.uk" {
1xyz
test4.db
}
I need to grep for "test.com" only, count the lines number and then add 2 to the line number so as to obtain "test2.db".
I tried "grep -n -w test.com" and it greps for multiple instances. How do I grep only exact matches and then do the line count? I am running the script on Solaris 10 OS.
hi how are you doing?
you people are great
your frnd just called me
this pen is yours right? are you sure
and when i grepped it..
# grep -w 'your' inputfile
your frnd just called me
when you used -w grep looked exactly for "your" and it didnt select the word "yours" from the file..which would have been selected if you had not used -w option