formating ping output

master
Júlio Pedrosa 2023-03-10 12:03:55 +01:00
parent cb30cce661
commit 7cfa0c4f3c
1 changed files with 1 additions and 1 deletions

2
ping
View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
echo ping ${HOSTNAME:=localhost} every ${TIMEOUT:=300} sec echo ping ${HOSTNAME:=localhost} every ${TIMEOUT:=300} sec
while true; do ping -c 1 ${HOSTNAME}; sleep ${TIMEOUT}; done; while true; do ping -c 1 ${HOSTNAME} | sed -e "1,$ s/^/ /" | sed "s/%//g" ;sleep ${TIMEOUT}; done;