As you can see I set up a simple script to ping google(8.8.8.8) that should respond back with "Good Ping"
if [ "ping -c 1 8.8.8.8 | grep 64 | cut -c 1-2" == '64' ]; then echo "Good Ping"; fi But it never responds with its echo statement
At the same time I can run:
ping -c 1 8.8.8.8 | grep 64 | cut -c 1-2 This resolves to '64' without an issue
I don't understand the top script will never print "Good Ping", could someone explain?