Tags: quicktip,howto,bash,shell
Date: 20220627
# The variable ~]$ lalas="lala1 <lala@lala1> lala2 <lala@lala2> lala3 <lala@lala3>" # Ouch #1 - well, that's not going to work ~]$ for i in $lalas;do printf $i; done lala1<lala@lala1>lala2<lala@lala2>lala3<lala@lala3> # Ouch #2 - this is even worse ~]$ for i in $lalas;do echo $i; done lala1 <lala@lala1> lala2 <lala@lala2> lala3 <lala@lala3> # Possible solution, treat it as an array ~]$ printf '%s\n' "${lalas[@]}" lala1 <lala@lala1> lala2 <lala@lala2> lala3 <lala@lala3> |