#!/bin/bash if ping -c1 "$1" &> /dev/null; then echo "$1" fi