title: Bash: Go up and down directories
body: <p>Dear stackoverflow community,</p>
  <p>I am new to bash and I've got a problem regarding loops and directories (code below). So I am working in the <strong>opensmile directory</strong> and want to look for <em><strong>.wav files</strong></em> in the subdirectory <strong>opensmile/test-audio/</strong>. But if I change my directory in the &quot;for&quot; section to test-audio/*.wav, it probably could find the .wav-files but then the main-action does have access to the necessary config file &quot;IS10_paraling.conf&quot;. Within the main-action the directories have to be written like after &quot;-C&quot;, so without a &quot;/&quot; before the directory.</p>
  <p>My loop works, if the wav files are inside the opensmile directory, but not inside a sub-directory. I would like to look for files in the subdirectory test-audio while the main-action still has access to all of the opensmile-directory.</p>
  <p>So basically: How do I go up and down directories within a for loop?</p>
  <p>Thank you very much in advance!</p>
  <h3>This works</h3>
  <pre><code>#! /bin/bash
  cd /usr/local/opensmile/
  
  for f in *.wav; 
  do
  /usr/local/opensmile/build/progsrc/smilextract/SMILExtract -C config/is09-13/IS10_paraling.conf -I $f -D output/$f.csv ;
  done
  </code></pre>
  <h3>This does not work</h3>
  <pre><code>#! /bin/bash
  cd /usr/local/opensmile/
  
  for f in test-audio/*.wav; 
  do
  /usr/local/opensmile/build/progsrc/smilextract/SMILExtract -C config/is09-13/IS10_paraling.conf -I $f -D output/$f.csv ;
  done
  </code></pre>