Ahoy,

how to get the following idiom ash-like translated? (I just called busybox on
my raspbian buster)


echo '12 34' | read a b ; echo "'${a}''${b}'"
''''

Doesnt the manual state that "The read utility shall read a single logical
line from standard input into one or more shell variables."
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html

IFS
    Determine the internal field separators used to delimit fields; see Shell
Variables.

And
The shell shall set IFS to <space> <tab> <newline> when it is invoked.



And why/how?
# echo $IFS|xxd
00000000: 0a                                       .
# unset IFS; echo $IFS|xxd
00000000: 0a                                       .
# IFS=" "; echo $IFS|xxd
00000000: 0a                                       .
# IFS=" " echo $IFS|xxd
00000000: 0a                                       .

e.g. in zsh:
IFS=' ' ; echo $IFS|xxd
00000000: 200a


_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to