Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11468
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Ángel González <angel@16bits.net> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Why does a Bash shell script write prompts followed by reads and do it right? |
| Date | Wed, 02 Sep 2015 20:27:06 +0200 |
| Lines | 14 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.415.1441218434.19560.bug-bash@gnu.org> (permalink) |
| References | <CAAykW6m4H2sSshWNfv3mQr9q6ScKzLebqMBgEo96vRUSBY6SAQ@mail.gmail.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | usenet.stanford.edu 1441218435 5485 208.118.235.17 (2 Sep 2015 18:27:15 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org, Robert Parker <rlp1938@gmail.com> |
| Envelope-to | bug-bash@gnu.org |
| In-Reply-To | <CAAykW6m4H2sSshWNfv3mQr9q6ScKzLebqMBgEo96vRUSBY6SAQ@mail.gmail.com> |
| X-Mailer | Evolution 3.16.5 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 3.x |
| X-Received-From | 199.195.249.9 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11468 |
Show key headers only | View raw
Robert Parker wrote:
> Yet when I attempt the same in a C program, the system always writes
> 2 prompts, then waits for a read.
> Does not matter if I write(1, "..."); read(0, number, buffer); or use
> fputs("...", stdout); fgets(.....
> The result is the same.
> And I have tried using readline without any better result.
I completely agree with Bob. It looks like your C program were doing a
loop (which your shell script doesn't!) and there's a wrong condition
somewhere.
But you need to show the code that is failing (provide a minimal
program that exhibits the failure).
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Why does a Bash shell script write prompts followed by reads and do it right? Ángel González <angel@16bits.net> - 2015-09-02 20:27 +0200
csiph-web