mardi 24 février 2015

how to express line feed in shell?


Im my debian7.8 bash shell.



str="deb http://ift.tt/17ss2fb wheezy main contrib non-free \n
deb-src http://ift.tt/17ss2fb wheezy main contrib non-free "

echo $str > test


In my test file it is :



deb http://ift.tt/17ss2fb wheezy main contrib non-free \n deb-src http://ift.tt/17ss2fb wheezy main contrib non-free


What i want is the :



deb http://ift.tt/17ss2fb wheezy main contrib non-free
deb-src http://ift.tt/17ss2fb wheezy main contrib non-free


how to express the line feed properly?



Aucun commentaire:

Enregistrer un commentaire