#!/usr/bin/env bash for arg in "$@"; do prips "$arg" | \ parallel --timeout 2 -j0 \ 'ping -c 1 {} >/dev/null && echo {}' 2>/dev/null done