hey all ..
i am trying to run this command on my machine by using python subprocess module ...
command :
i am trying to run this command on my machine by using python subprocess module ...
command :
ping -c 1 -t 1 -w 1 192.168.1.81 | grep "ttl=" | awk {'print $4'} | sed 's/.$//'code
import subprocess q= subprocess.run(['ping', '-c' ,'1' ,'192.168.1.81' , '| grep ttl' , ' awk {"print $4"}' , " sed 's/.$//'"], capture_output=True) print(q.stdout.decode())i dont get an error i just get an empty result !!