mirror of
https://git.busybox.net/busybox
synced 2025-05-10 04:33:59 +02:00
With bash's read builtin it is possible to read from a file (e.g. device-tree) until the first '\0' character: IFS= read -r -d '' VARIABLE < file In busybox ash the -d extension is also implemented, but checking the read character for '\0' has to be performed after comparing with the delimiter. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
1 line
58 B
Text
Executable file
1 line
58 B
Text
Executable file
printf 'test\0zest\n' | (read -d '' reply; echo "$reply")
|