我正在使用 Mac。我有一个名为 1 的目录。目录Test内的A(名称中有空格)
现在,下面的 ksh 脚本
typeset MyPath=1.*
print $MyPath
cd $MyPath
pwd
cd ..
touch $MyPath/File.txt
生产
1. A
Test/1. A
touch: 1.*/File.txt: No such file or directory
因此看起来 print 和 cd 都可以识别模式“1.A”,但 touch 不能。为什么?