My code was like this I'm passing 4 arguments to a script
ex.sh "wavpath" "featpath"
"ex.sh" code is
#!/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
The error message:
bad substitution
and it is at ${dir/$wavPath/$featPath}
and its showing both the paths
can anyone help