码迷,mamicode.com
首页 > 系统相关 > 详细

shell 单引号以及双引号

时间:2019-08-24 00:39:01      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:tps   html   mac   class   双引号   col   cname   输出   nbsp   

 

#!/bin/bash
a=23
echo $a
echo "$a"

your_name=runoob
str="Hello, I know you are \"$your_name\"! \n"
echo -e $str
echo $str

输出

bogon:Desktop macname$ ./test.sh 
$a
23
Hello, I know you are "runoob"! 

Hello, I know you are "runoob"! \n

 

 

参考:

https://www.runoob.com/linux/linux-shell-variable.html

 

shell 单引号以及双引号

标签:tps   html   mac   class   双引号   col   cname   输出   nbsp   

原文地址:https://www.cnblogs.com/sea-stream/p/11403110.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!