title: Filtering the output of ping with cut
body: <p>I'm having trouble with my internet service provider.  </p>
  
  <p>Despite having set up a smoke ping server that clearly shows that there are intermittent spikes of latency with packet loss, they have asked for traceroutes to each of the smokeping servers targets; one set when there is no latency/loss and another when there is.  </p>
  
  <p>I understand why they are asking, they want to see if there is some kind of routing issue.  </p>
  
  <p>I've created a script that traceroutes all targets at once and outputs to a file, but I need to develop a script that calls the traceroute script when latency exceeds a certain value.</p>
  
  <p>To this end, I have made the following script, but it's failing as cut includes not just a number but also "ms".  How can I further filter its output to include just the number? </p>
  
  <pre><code>#/bin/bash
  
  while :
      if [ ping | cut -f5 d" " -gl 400 ]
      then
          wait 15
    else
      ./path/script
      fi
  done
  </code></pre>