title: Check in file the data match the syntax
body: <p>i have a scenario where i want to check the below details in files match the syntax</p>
  
  <p><strong>Syntax :</strong> NAME/SURNAME/COUNTRY</p>
  
  <p><strong>Note :</strong> <em>every record in file should match the syntax. if one records does not match then should display 
  failed or success</em></p>
  
  <p><strong>File data</strong> </p>
  
  <pre><code>Ajay/abc/india
  Avik/bcs/delhi
  Viraj/xyz/
  </code></pre>
  
  <p><em>As you can see the file data the last record does not match according to the syntax 
  then should display failed</em>  </p>
  
  <p><strong>My code</strong> </p>
  
  <pre><code> for i in `cat /demo/Student.txt`
        do 
        check=`echo $i | cut -d '/' -f3`
        if [[ -z $check ]];
        then 
          echo failed syntax does not match NAME/SURNAME/COUNTRY
          exit 1 
        fi 
      done
  </code></pre>