#!/bin/bash fruit=apricot area=beijing #輸出為apriot\nbeijing echo "$fruit\n$area" #輸出為apriot\beijing echo "$fruit\\$area" #輸出為aprioteijing echo -e "$fru ...
#!/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'