bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: Questions to bash "read" builtin functionality


From: Chet Ramey
Subject: Re: AW: Questions to bash "read" builtin functionality
Date: Mon, 17 Dec 2012 09:09:39 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20121026 Thunderbird/16.0.2

On 12/17/12 3:34 AM, Fiedler Roman wrote:

> That is strange: If I understand correctly, following script combined with 
> the one from first mail should still fail, but with different error. But it 
> fails in a way similar to discarding partial input, not saving it. Could it 
> be, that Ubuntu-bash works differently? Output on my  side is:
> 
> Script:
> 
> #!/bin/bash
> line=""
> while true; do
>   read -t 1 line
>   status="$?"
>   if [ "${status}" != "0" ]; then
>     echo "Read status ${status}, value \"${line}\"" >&2
>     continue
>   fi
>   if [ "${line}" != "Status: OK" ]; then
>     echo "FAILED READ: \"${line}\"" >&2
>     exit 1
>   fi
> done
> 
> # ./FragmentedSend.py | ./BashReadTest

What is FragmentedSend.py?  If I can use the same scripts you are, I can
try to reproduce it.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]