title: Autofill Linux dialog display box
body: <p>I am making installation script for my Linux.
  When I am trying to install normal packages, I do the following in a script:</p>
  <pre><code>apt install &lt;PACKAGE&gt; &amp;&gt; /dev/null &amp;&amp;
  echo -e &quot;[+]   Package '&lt;PACKAGE&gt;' was installed.&quot; || echo -e &quot;[-] ! ERROR! Package '&lt;PACKAGE&gt;' could not be installed!&quot;
  </code></pre>
  <p>My problem is with the packages, that require dialog interaction on installation (and I would like to avoid installing from source if possible):</p>
  <p><strong>install.sh</strong></p>
  <pre><code>#!/bin/bash
  apt install macchanger wireshark 2&gt; /dev/null -y &amp;&amp;
  echo -e &quot;[+]   Networking tools 'macchanger wireshark' installed.&quot; || echo -e &quot;[-] ! ERROR! Networking tools 'macchanger wireshark' could not be installed!&quot;
  </code></pre>
  <blockquote>
  <p>./install.sh | tee -a /root/install-output.txt</p>
  </blockquote>
  <p>The problem is, that when I try to install packages from above example, I am prompted with dialog box. When this happens in <strong>stdout</strong> and <strong>tee output file</strong> are logs from <em>apt</em> and also from <em>dialog</em> (gibberish in output file).</p>
  <p>I cannot redirect both stdout and stderr <strong>&amp;&gt; /dev/null</strong>, because than I am unable to fulfill dialog box.</p>
  <p>My questions are following:</p>
  <ol>
  <li>Is there any option how to autofill dialog box from script/command line for example with <strong>NO</strong> answers for these dialogs?</li>
  <li>Or is there any option how to at least not output anything from <em>apt</em> to <strong>stdout</strong> and <strong>tee file</strong> and from <em>dialog</em> to not output gibberish to <strong>tee output file</strong>?</li>
  </ol>