title: How do I Assign directory path to a variable during mkdir in shell script without cd?
body: <p>I have a shell script where I am </p>
  
  <p>making directory structure:</p>
  
  <pre><code>mkdir -p /root/project/log
  mkdir -p /root/project/graphs
  mkdir -p /root/project/source
  mkdir -p /root/project/config
  </code></pre>
  
  <p>I have variables to make my script readable.</p>
  
  <pre><code>LOGPATH = 
  GRAPHPATH =
  SOURCEPATH =
  CONFIGPATH = 
  </code></pre>
  
  <p>How do I assign these variables <strong>during mkdir</strong> itself? </p>
  
  <p>I want the actual path description to stay just in one place.</p>
  
  <p>I dont like to cd and assign pwd.</p>