title: for loop for multiple extension and do something with each file
body: <p>I'm trying to write a for loop in bash to get the files with extension of jpg, jpeg, png,  this i my attempt, but does not work</p>
  
  <pre><code>for file in "${arg}"/*.{jpg,jpeg,png}; do echo ${arg}-something.jpg &gt; z.txt ; done;
  </code></pre>
  
  <p>basically, i want to get the name of the file with those extension in the current folder, and do something with each file, then output the filename back with a new extension.</p>