2015-09-24

Ping servers from a text file

This may look very simple ... but it took me some time to figure out :-(

I am on a Linux box and have a text file with server names / IPs that I want to ping.

How can I do that in a one-liner?

Here is what helped me:

cat [path to textfile] | xargs -n1 ping -c 2


Now I am still looking for a PowerShell one-liner to do something similar.

If you know one, please let me know in the comments.

No comments:

Post a Comment