Article 5MGVK cmd bash "cat" behaves differently when is added to variable

cmd bash "cat" behaves differently when is added to variable

by
bryn1u
from LinuxQuestions.org on (#5MGVK)
Hey guys,

Im trying to use cat which is assigned to variable. But the output of "cat" is differently then from command line, why ?
Code:root@Proton:[~]:#> cat text
dupufufr3
frerfr3
3r
edziopedzio
frwnfru
fjwlfrew
fklwkfw
fkwf

root@Proton:[~]:#> variable="$(cat text)"
root@Proton:[~]:#> echo $variable
dupufufr3 frerfr3 3r edziopedzio frwnfru fjwlfrew fklwkfw fkwfWhy this is interpreted differently ? How can i get the same output as from command line ?

Thank you,latest?d=yIl2AUoC8zA latest?i=QQAtGoUl34M:JCHurLXxwiA:F7zBnMy latest?i=QQAtGoUl34M:JCHurLXxwiA:V_sGLiP latest?d=qj6IDK7rITs latest?i=QQAtGoUl34M:JCHurLXxwiA:gIN9vFwQQAtGoUl34M
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments