Im my debian7.8 bash shell.
str="deb http://ftp.cn.debian.org/debian/ wheezy main contrib non-free \n
deb-src http://ftp.cn.debian.org/debian/ wheezy main contrib non-free "
echo $str > test
In my test file it is :
deb http://ftp.cn.debian.org/debian/ wheezy main contrib non-free \n deb-src http://ftp.cn.debian.org/debian/ wheezy main contrib non-free
What i want is the :
deb http://ftp.cn.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ wheezy main contrib non-free
how to express the line feed properly?
\n
and quote your variable... – jasonwryan Feb 24 '15 at 01:39