title: Multiple variables into one variable with wildcard
body: <p>I have this script:</p>
  
  <pre><code>#!/bin/bash
  ping_1=$(ping -c 1 www.test.com  | tail -1| awk '{print $4}' | cut -d '/' -f 2 | sed 's/\.[^.]*$//')
  ping_2=$(ping -c 1 www.test1.com | tail -1| awk '{print $4}' | cut -d '/' -f 2 | sed 's/\.[^.]*$//')
  ping_3=$(ping -c 1 www.test2.com | tail -1| awk '{print $4}' | cut -d '/' -f 2 | sed 's/\.[^.]*$//')
  ping_4=$(ping -c 1 www.test3.com | tail -1| awk '{print $4}' | cut -d '/' -f 2 | sed 's/\.[^.]*$//' )
  </code></pre>
  
  <p>Then I would like to treat the outputs of <code>ping_1-4</code> in one variable. Something like this:</p>
  
  <pre><code>#!/bin/bash
  
  if [ "$ping_*" -gt 50 ]; then
      echo "One ping is to high"
  else
      echo "The pings are fine"
  fi
  </code></pre>
  
  <p>Is there a possibility in <code>bash</code> to read these variables with some sort of wildcard?</p>
  
  <pre><code>$ping_*
  </code></pre>
  
  <p>Did nothing for me.</p>