#!/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
原文地址:https://www.cnblogs.com/sea-stream/p/11403110.html
时间: 2024-10-04 05:23:30