Basically I just want to combine all lines into a single line in pipe.
# ls / | grep b
# ls / | grep b | reduce
ls output is not recommended as its brittle.
But as for your question you can do something like this:
$ls -1 / | grep b | paste -s -d '' binbootlib
ls -1 ensures single column format and
paste combines all lines of text serially (
-s) with delimiter (
-d) as nothing