bash script 語法問題 - Linux

Table of Contents

我在網路上看到這樣一段 code:

for i in *.tfm
do
cat >> hei.map << EOF
${i%.tfm} ${i%.tfm} < ${i%.tfm}.pfb
EOF
done


請問 ${i%.tfm} 後面的 %.tfm 代表的是什麼意思?
我知道 ${i} 代表的是 i 變數,但是加了 %.tfm 就搞不懂了,
麻煩了!感謝~

--

All Comments

Sarah avatarSarah2009-06-20
# man bash search %% ${# 那一段有寫
John avatarJohn2009-06-22
可以看鳥哥的網站有說明bash,在變數的部份有#和%的說明