Ping Success or Failure using Bash

| 0 Comments
#!/bin/bash

if ping -c 1 hostfoo > /dev/null
   then
	echo "ping success"
   else
        echo "could not ping hostfoo. exiting..."
fi

Leave a comment

Recent Entries

Starting VMware Fusion from the Command Line
open /Applications/VMware\ Fusion.app/Contents/MacOS/vmware…
Ping Success or Failure using Bash
#!/bin/bash if ping -c 1 hostfoo > /dev/null then echo "ping success" else echo "could not ping hostfoo. exiting..."…
Automating SSH public key pushes with Perl
Automating SSH public key pushes to servers. The code below uses Expect and SSH to create & permission the .ssh…