Honored Contributor Honored Contributor
Re: shell to perl script
great, thanks a ton...i will check them... i will provide one opcragt output as well...

one more small grep help...i am having two list of nodes. i want to compare them and make the list of nodes present in fair and missing in app1
ie,
grep $NODE app1-node-list >>present
if $NODE not present in app1 node list, i want to write it in a new file...how to do that please....

root@fair> ll
total 224
-rw-r--r-- 1 root sys 85757 Nov 12 01:47 app1-node-list
-rw-r--r-- 1 root sys 19198 Nov 12 08:25 fair-node-list
root@fair>
root@fair> for NODE in `cat fair-node-list`
> do
> grep $NODE app1-node-list >>present
> done
root@fair> ll
total 256
-rw-r--r-- 1 root sys 85757 Nov 12 01:47 app1-node-list
-rw-r--r-- 1 root sys 19198 Nov 12 08:25 fair-node-list
-rw-r--r-- 1 root sys 14017 Nov 12 09:28 present
root@fair> wc *
7637 7660 85757 app1-node-list
1576 1570 19198 fair-node-list
1192 1192 14017 present
10405 10422 118972 total
root@fair>