title: Bash Syntax error in conditional expression
body: <p>I'm trying to make a simple bash script that will iterate through a text file containing IP addresses,
  ping them one time, and see if they are alive or not.</p>
  
  <p>This is my work so far:</p>
  
  <pre><code>#!/bin/bash
  
  for ip in $(cat ips.txt); do
  if [[ "1" ==  "$(ping -c 1 $ip | grep 'packets transmitted' | cut -d ' ' -f 4)"]]
  echo $ip
  fi
  done
  </code></pre>
  
  <p>Any Suggestions?
  Thanks!</p>