title: how to terminate a process via key stroke
body: <p>I have this function on my bash script:</p>
  <pre><code>sudo tshark -i eth0 -T fields -e ip.src -e dns.qry.name -Y &quot;dns.qry.name~.&quot; -q 1&gt;&gt;log.txt 2&gt;/dev/null &amp;
  while true
  do
  cat log.txt
  done
  </code></pre>
  <p>it is capturing ips and domain names in live mode and save them into log file.
  how can configure this live mode to be terminated by pressing a key?</p>