Portál AbcLinuxu, 27. července 2025 13:07
sh /home/pi/speedtest.sh curl: (6) Could not resolve host: 442.439, curl: (6) Could not resolve host: "Download_Mbits" curl: (6) Could not resolve host: 3.23, curl: (6) Could not resolve host: "Upload_Mbits" curl: (7) Failed to connect to 3.86 port 80: Connection timed outSoubor speedtest.sh generuje '"Ping_ms": 38.623, "Download_Mbit": 14.06, "Upload_Mbit": 5.69'
#!/bin/sh data=`speedtest-cli --simple | perl -pe 's/^(.*): (.*) (.*?)(\/s)?\n/"$1_$3": $2, /m' | cut -d',' -f 1-3` curl -F 'data='$data http://www.example.com/linux/speedtest.php
$data
dej do uvozovek.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.