Answer by Gilles for how to express line feed in shell?
Just include an actual newline inside the quotes (this works with either single or double quotes). Note that if the second line is indented, the spaces are part of the string. Furthermore always use...
View ArticleAnswer by orion for how to express line feed in shell?
One option is to use echo -e to expand the escape sequences. The second option is to simply use a "literal" newline (works in bash): str = "deb ... non-free "$'\n'"deb-src ... non-free " echo "$str"...
View ArticleAnswer by muru for how to express line feed in shell?
Aside from jasonwryan's suggestion, I'd suggest using printf: $ printf "%s http://ftp.cn.debian.org/debian/ wheezy main contrib non-free\n" deb deb-src > test $ cat test deb...
View Articlehow to express line feed in shell?
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...
View Article