命令:
# echo -e “First LinenSecond Line”
# printf “First LinenSecond Line”
在bash脚本中 n 的使用:
n(换行)被用作基于Unix系统的换行字符。下面是一个简单的例子,在bash shell脚本使用换行字符。使用以下的例子之一# echo -e "This is First Line nThis is Second Line"
# echo -e 'This is First Line nThis is Second Line'
# echo $'This is First Line nThis is Second Line'
# printf "This is First Line nThis is Second Line"