Update client.py
This commit is contained in:
1 parent
c061f9ae0a
commit
91b7863872
1 file changed
+2
-4
+2
-4
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import socket
|
||||
import sys
|
||||
|
||||
PORT = 5055
|
||||
ALL_IPS = [
|
||||
@@ -46,7 +47,6 @@ def grep_all_ips(ips, cmd):
|
||||
try:
|
||||
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
client_socket.connect((ip, PORT))
|
||||
# print(f"Connected to server at {ip}:{PORT}")
|
||||
|
||||
full_cmd = cmd + f" ./machine.{i + 1}.log"
|
||||
|
||||
@@ -68,9 +68,7 @@ def grep_all_ips(ips, cmd):
|
||||
|
||||
return match_count
|
||||
|
||||
#get all the argument of call
|
||||
import sys
|
||||
|
||||
#main
|
||||
cmd = "grep " + " ".join(sys.argv[1:])
|
||||
match_count = grep_all_ips(ALL_IPS, cmd)
|
||||
|
||||
|
||||
Reference in new issue
Block a user