Bash shell中的双引号与单引号用法示例,bashshell【

作者:电脑系统

echo '$fruit\$area'

Bash shell中的双引号与单引号用法示例,bashshell

 

#!/bin/bash

 

fruit=apricot

area=beijing

 

#输出为apriotnbeijing

echo "$fruitn$area"

 

#输出为apriotbeijing

echo "$fruit\$area"

 

#输出为aprioteijing

echo -e "$fruit\$area"

 

#输出为apriot

#         beijing

echo -e "$fruitn$area"

 

#输出为$fruitn$area

echo '$fruitn$area'

 

#输出为$fruit\$area

echo '$fruit\$area'

 

#输出为$fruit$area

echo $'$fruit\$area'

 

#输出为$fruit

#         $area

echo $'$fruitn$area'

shell中的双引号与单引号用法示例,bashshell #!/bin/bash fruit=apricot area=beijing #输出为apriotnbeijing echo "$fruitn$area" #输出为apriotbeijing echo "$...

#输出为$fruit\$area

 

#输出为apriotnbeijing

#输出为$fruit$area

area=beijing

 

#输出为$fruitn$area

 

#         $area

 

#输出为apriotbeijing

#         beijing

echo $'$fruit\$area'

#!/bin/bash

#输出为aprioteijing

#输出为$fruit

fruit=apricot

echo '$fruitn$area'

#输出为apriot

 

 

echo "$fruit\$area"

 

 

 

 

echo -e "$fruit\$area"

echo $'$fruitn$area'

echo -e "$fruitn$area"

echo "$fruitn$area"

本文由分分快三计划发布,转载请注明来源

关键词: 分分快三计划