Parse file from remote server to caculate count of string existence in that file
Hi
I need to parse the file of same name which exist on different servers and calculate the count of string existed in both files. Say a file abc.log exist on 2 servers. I want to search for string "test" on both files and calculate the total count of search string's existence. For example if file abc.log on server 1 has string "test" 2 times and file abc.log on server 2 has string "test" 4 times. then the output will be StringName : Count example test : 6 times Note : I have created the password less connectivity using ssh-keygen. Please help. Thanks inn advance. |
you can get the count like this for a start
Code:
grep -o pattern file|wc -l |
Parse file from remote server to caculate count of string existence in that file Reply to Thread
Hi Ghostdog,
I need to know how i can access this file without copying on my server using ssh , calculate the count and exit. thats it Quote:
|
All times are GMT -5. The time now is 02:09 AM. |