<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Wed, 10 Jun 2026 10:07:06 +0000</lastBuildDate>
    <item>
      <title>(Bash) Empty keyboard buffer - niglesias</title>
      <link>https://snipplr.com/view/53827/empty-keyboard-buffer</link>
      <description>&lt;p&gt;Empties the keyboard buffer. Useful to discard keyboard input during a command execution inside a bash script.&#13;
Try this script without this line:&#13;
&#13;
read -t 0.1 -N 255&#13;
&#13;
and enter any garbage ([ENTER] and all) during these 2 seconds window...&#13;
&#13;
The modifiers:&#13;
-t 0.1       Tiemout read on 0.1 seconds - so read won't wait to get all 255 characters&#13;
-N 255    Read 255 characters, treating any special character ([ENTER], tabs, etc.) as normal characters&lt;/p&gt;</description>
      <pubDate>Fri, 20 May 2011 05:51:02 UTC</pubDate>
      <guid>https://snipplr.com/view/53827/empty-keyboard-buffer</guid>
    </item>
  </channel>
</rss>
