The bash version in my system’s running version of Debian is:
bash --version|awk 'NR==1'
GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu)
In Eyal Levin's answer on this other Stack Overflow thread it recommends this:
Example:
$ echo "title\nvalue1\nvalue2\nvalue3" | (read line; echo "$line"; grep value2)
Output:
title
value2
In my Bash console I run this:
debian@debian:~$ echo "title\nvalue1\nvalue2\nvalue3" | (read line; echo "$line"; grep value2)
titlenvalue1nvalue2nvalue3
debian@debian:~$
Why the command output different result in my OS?
echo "title\nvalue1\nvalue2\nvalue3" | (read line; echo "$line"; grep value2)