I am interested to know why the ip are not listed with the -w option in grep
It works fine on my ubuntu 8.04 version(bash) but not in my HP-UX Release 11i (ksh)
It works fine on my ubuntu 8.04 version(bash) but not in my HP-UX Release 11i (ksh)
Code:
mysys:/tmp/x->find . -type f -print | xargs grep -n -w '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
mysys:/tmp/x->find . -type f -print | xargs grep -n '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
./test/myfile.txt:2:this line contains ip 192.162.110.2
./test/myfile.txt:3:mutliple ip on single line 193.254.110.23 ans with the 10.10.10.1
./test/testfile2.txt:2:192.23.345.45
./test/testfile2.txt:3:includes ip configured to match teh currenmt 10.11.101.23
Comment