title: linux bash script to create folder and move files
body: <p>Hello I need to create folder based on a filename and in this folder create another one and then move file to this second folder</p>
  
  <p>example:<br>
  my_file.jpg<br>
  create folder my_file<br>
  create folder picture<br>
  move my_file.jpg to picture  </p>
  
  <p>I have this script but it only works on windows and now I'm using Linux</p>
  
  <pre><code>for %%A in (*.jpg) do mkdir "%%~nA/picture" &amp; move "%%A" "%%~nA/picture"
  pause
  </code></pre>
  
  <p>Sorry if I'm not precise but English is not my native language.</p>