4.显示换行

-e 一定要才能转义 n 为换行,双引号可以不写

echo -e "OK! n" # -e 开启转义
echo "It it a test"

输出结果:

OK!

It it a test

5.显示不换行

#!/bin/sh
echo "OK! c" # -e 开启转义 c 不换行
echo "It is a test"

! It is a test