我的代码是这样的,我将 4 个参数传递给脚本
ex.sh "wavpath" "featpath"
“ex.sh”代码是
#!/bin/bash
wavPath=$1
featPath=$2
rm -f $scpFile
echo $wavPath
echo $featPath
for dir in `ls -R $wavPath|grep ":"|cut -d':' -f1`
do
mkdir -p ${dir/$wavPath/$featPath}
done
错误信息:
不良替代
它在${dir/$wavPath/$featPath}
并且它显示了两条路径
谁能帮忙