title: Keeping forward slash in bash $argument for a directory name in MacOSX
body: <p>In MacOSX it is possible to create a folder in Finder that contains a forward slash "/" in the name.</p>
  
  <p>I am trying to bash script the same by doing something similar to  </p>
  
  <pre><code>args=("$@")
  name=${args[0]}
  street_corner=${args[1]}
  my_folder="Hello ${name} - ${streetcorner}"
  mk () {
    case "$1" in /*) :;; *) set -- "./$1";; esac
    mkdir -p "$1"
  }
  mk $my_folder
  </code></pre>
  
  <p>where street corner is a crossing in the format "street 1/street 2" and thus needs the slash to be kept in the directory name.</p>
  
  <p>I read <a href="https://stackoverflow.com/questions/39646508/bash-remove-forward-slash">several articles like this one</a> where they explain how to manipulate the string to escape or keep the forward when you set the string yourself. The problem I have is that the user passes the argument to be used in the script and therefore the string is already encapsulated when i run the command to the make a directory with <strong>$my_folder</strong> as argument. </p>
  
  <p>How do I expand the value of street_corner without letting the forward slash create a subdirectory named "street 2" located inside the directory "street 1" but instead creating a single directory called "street 1/street 2"? </p>
  
  <p>I have tried these fixes and failed</p>
  
  <pre><code>street_corner="${args[0]}"
  my_folder='"Hello ${name} - ${streetcorner}"'
  my_folder="'Hello ${name} - ${streetcorner}'"
  my_folder="Hello ${name} - ${'streetcorner'}"
  my_folder="Hello ${name} - ${$"streetcorner"}"
  my_folder="Hello "${name}" - "${streetcorner}
  </code></pre>
  
  <p>And also tried to give the input for street_corner like</p>
  
  <pre><code>./my_script.sh "name" "street 1\/street 2"
  ./my_script.sh "name" 'street 1/street 2'
  ./my_script.sh "name" "'street 1/street 2'"
  </code></pre>