title: How to capture file names and check for date part in the filename in Unix code?
body: <p>I am a newbie to linux and I have a requirement where I need to capture the file names, check the date in the file names and proceed and load the data from all the files only if all the file names have the same date in them. Lets say, I have few files</p>
  
  <pre><code>X_US_20130420.CSV
  X_CA_20130420.CSV
  X_PH_20130420.CSV
  X_NS_20130420.CSV
  </code></pre>
  
  <p>I need to check if all the files have the same date (20130420 here) and then use that date as a parameter in my next job. Please help.</p>