2011-03-14 20 views

回答

8

使用大括號,如下所示:

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

輸出:

this is the 2nd 
2

您可以使用:

echo "this is the ${num}nd"