Skip to content

Instantly share code, notes, and snippets.

@annttu
Created July 11, 2019 10:40
Show Gist options
  • Select an option

  • Save annttu/f6135b2a79ccb53b0639145ac47ef08c to your computer and use it in GitHub Desktop.

Select an option

Save annttu/f6135b2a79ccb53b0639145ac47ef08c to your computer and use it in GitHub Desktop.
Logpinger
#!/bin/bash
test -z "$1" && exit 1
ping -OW 1 "$1" 2>&1 | while read line; do echo `date` - $line; done |tee -a "$1".log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment