title: Bash script for decrypting all files inside folder
body: <p>I am using cygwin and I want help with creating a bash script to decrypt all files inside folder. now for decryption part script should check segment number in filename (file names are like 1_segment, 2_segment etc) and genrate hexadecimal value of that file. now decryption goes like below.</p>
  
  <pre><code>openssl enc -aes-128-cbc -in 121_segment121_9_av.ts -out  test.ts -d -K 443CEB41F639B41CE29D1507647A3737 -iv 00000000000000000000000000000079
  </code></pre>
  
  <p>K is key value which is same for every file
  iv is hexadecimal value of segment no which changes for each file.</p>
  
  <p>Pls help I am really stuck here.</p>
  
  <p>Regards
  Adi</p>