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