[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
- read Built-in Parameter Behavior -- Null Byte Delimiter, Adam Danischewski, 2016/01/16
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter,
Piotr Grzybowski <=
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Martijn Dekker, 2016/01/16
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Greg Wooledge, 2016/01/18
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Chet Ramey, 2016/01/18
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Greg Wooledge, 2016/01/18
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Chet Ramey, 2016/01/18
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Adam Danischewski, 2016/01/19
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Greg Wooledge, 2016/01/19
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Adam Danischewski, 2016/01/19
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Greg Wooledge, 2016/01/19
- Re: read Built-in Parameter Behavior -- Null Byte Delimiter, Reuti, 2016/01/25