2011-03-14 49 views

回答

8

使用大括号,如下所示:

num=2 
echo "this is the ${num}nd" 

输出:

this is the 2nd 
2

您可以使用:

echo "this is the ${num}nd"