title: How to limit maximum line in log file
body: <p>Given a bash script running <code>ping -c 25 google.com | tee /home/user/myLogFile.log</code></p>
  
  <p>And the output file <code>/home/user/myLogFile.log</code> containing:</p>
  
  <pre><code>PING google.com (117.102.117.238) 56(84) bytes of data. 
  64 bytes from 117.102.117.238: icmp_seq=1 ttl=61 time=12.7 ms
  64 bytes from 117.102.117.238: icmp_seq=2 ttl=61 time=61.1 ms
  (...)
  64 bytes from 117.102.117.238: icmp_seq=25 ttl=61 time=7.11 ms
  
  --- google.com ping statistics ---
  25 packets transmitted, 25 received, 0% packet loss, time 24038ms
  rtt min/avg/max/mdev = 5.573/11.293/61.102/11.210 ms
  </code></pre>
  
  <p>How to limit the maximum lines in the log file, and if that maximum is reached, the file is reset and keep the next output saved?</p>