title: Creating a bash script to ping and traceroute multiple websites (OSX)
body: <p>I have a Mac and I would like to ping and traceroute multiple websites over several days and save those data to a .txt file. I found out that using bash script I can automate this process instead of commanding and copying results.</p>
  
  <p>Unfortunately I was not able to find enough information to do this by myself so I am posting a question here.</p>
  
  <p><strong>For example:</strong></p>
  
  <pre><code>ping -c 1 google.com
  </code></pre>
  
  <p>Result in .txt file:</p>
  
  <pre><code>PING google.com (210.7.45.30): 56 data bytes
  64 bytes from 210.7.45.30: icmp_seq=0 ttl=61 time=8.595 ms
  </code></pre>
  
  <p>So how do I create a bash file to ping and traceroute multiple websites and put the results into a single txt file?</p>