From 8f8c4cdd176fda4d93a2d1d4b0ae6321d5706e5f Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Sun, 21 Sep 2014 19:18:56 -0700 Subject: Implement new `read --null` flag The `--null` flag to `read` makes it split incoming lines on NUL instead of newlines. This is intended for processing the output of a command that uses NUL separators (such as `find -print0`). Fixes #1694. --- tests/read.out | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/read.out') diff --git a/tests/read.out b/tests/read.out index 0de98831..d8cf948d 100644 --- a/tests/read.out +++ b/tests/read.out @@ -16,6 +16,7 @@ two 1 '' 1 '' 1 '' 1 'test' 1 '' 1 '' +1 'foo' 1 'bar' 1 ' baz' 1 'hello' 1 'h' 1 'ello' @@ -42,3 +43,14 @@ test tes tin t + +# read -z tests +testing +test ing +newline + +1 'test' 1 'ing' +1 'test' 1 '' +1 'foo' 1 'bar' +2 'foo' 'bar' +2 'baz' 'quux' -- cgit v1.2.3