Bash shell中的双引号与单引号用法示例
#!/bin/bash
fruit=apricot
area=beijing
#输出为apriot\nbeijing
echo "$fruit\n$area"
#输出为apriot\beijing
echo "$fruit\\$area"
#输出为aprioteijing
echo -e "$fruit\\$area"
#输出为apriot
# beijing
echo -e "$fruit\n$area"
#输出为$fruit\n$area
echo '$fruit\n$area'
#输出为$fruit\\$area
echo '$fruit\\$area'
#输出为$fruit\$area
echo $'$fruit\\$area'
#输出为$fruit
# $area
echo $'$fruit\n$area'