Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要回显包含星号(*)的变量,但星号始终与当前字典中的所有文件名一起传输。就像 a.sh; b.sh; c.sh; 在 c.sh
var="select * from userTable"; echo $var; echo $var >> tmp.sql;
输出结果变为“select a.sh b.sh c.sh from userTable”;为了输出星号(*)应该怎么做?非常感谢
您需要使用echo "$var"for stop*来用作通配符。所以使用以下(注意;在 bash 中并不真正需要)
echo "$var"
*
;
var="select * from userTable" echo "$var" echo "$var" >> tmp.sql