title: Bash shell read names of files from folder and create an output file for each input file with the same name:
body: <p>In bash shell I am reading all the files in a folder as follows:</p>
  
  <pre class="lang-sh prettyprint-override"><code> #!/bin/bash
   FILES=MyFolder/*
   for f in $FILES
   do
      echo "Started $f file..."
      ./$f &gt; $f_july_15.txt
      echo "Finished $f file..."
   done
  </code></pre>
  
  <p>In line 6 I am trying to save the output of each file in a txt file that contains the name of the input file as follows: <code>$f_july_15.txt</code>. I noticed that the txt file does not get created at all, while the <code>echo</code> calls and the command <code>./$f</code> get executed correctly. I played a little bit moving <code>$f</code> inside the name, but I can not get the name of the input file in the output file.
  Can anyone please show me why this is happening and how I can solve this?</p>