<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 16, 2015 at 10:38 AM, Rick Hornsby <span dir="ltr">&lt;<a href="mailto:richardjhornsby@gmail.com" target="_blank">richardjhornsby@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think I understand the problem - what&#39;s happening is that because there&#39;s an input pipe to bash, read takes the next line of the script as its input instead of taking it from the user - they&#39;re both on stdin.</blockquote></div><br>If I understand your question/scenario, you probably want to redirect your read from /dev/tty (a la &quot;$ read &lt; /dev/tty someVariable&quot;).  You can also use the tty command to figure out if there is actually a tty associated with the shell (e.g., to provide some useful default behavior if the script is run from, say, a crontab or at job).</div><div class="gmail_extra"><br></div><div class="gmail_extra">Jeff</div><div class="gmail_extra"><br></div></div>