bug-bash
[Top][All Lists]
Advanced

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

Re: read Built-in Parameter Behavior -- Null Byte Delimiter


From: Piotr Grzybowski
Subject: Re: read Built-in Parameter Behavior -- Null Byte Delimiter
Date: Sun, 17 Jan 2016 00:25:02 +0100

hi,

On Sat, Jan 16, 2016 at 8:28 PM, Adam Danischewski
<adam.danischewski@gmail.com> wrote:
> ..
> Yet if we look for the null byte:
> $> while IFS= read -r -d'' a; do echo "got $a"; done < <(find . -type f
> -print0)
>                        returns nothing

 this is because it is the same as:

read -r -d a;

 I think there is no way to distinguish the two.
 The documentation clearly says:

-d delim

 so without going into details of how getopt works, it seems to me
that this is not a bug.

> $> while IFS= read -r -d '' a; do echo "got $a"; done < <(find . -type f
> -print0)
>                        returns the expected results

pg



reply via email to

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