title: directories and file arrangement in bash
body: <p>I'm trying to write a script that will put files with different extensions into their specified  directories .</p>
  
  <p>In the directory are files of various types, i want to arrange the files on individual directories under their type. There are three distinct types of files:</p>
  
  <ol>
  <li>Text documents - files with extensions. Doc,. Txt,. Pdf, ...</li>
  <li>multimedia files - with the extensions. Mpg,. Avi,. Mp3 ...</li>
  <li>graphics files - with the extensions. Jpg,. Gif,. Png ...</li>
  <li>All other files</li>
  </ol>
  
  <p>Files types 1-3 to move into individual directories and files of other types have to move in directories with names corresponding to the extension (you can bring them to uppercase - BAK, CPP ,...).</p>
  
  <p>i want the script to run with the following parameters:</p>
  
  <ol>
  <li>-m path - if specified, the multimedia files will be moved to the directory PATH</li>
  <li>-d PATH - specifies the path where you have to move your documents</li>
  <li>-l indicates that when the file names should lead to lower case</li>
  <li>-x indicates that they move to lower case file extension</li>
  </ol>
  
  <p>any ideas?? I am a newbie and I'm trying to learn bash scripting so I thought of this question</p>