title: comparing two files based on count and if the count differs it notifies via mail
body: <p>am trying to compare two files in the same dir which for example is like a.txt,a1.txt, b.txt,b1.txt,c.txt,c1.txt. now I have a similar kind of multiple files. if there is going to be any change it has to mail me. I have written a sample code below but that errors out for me. If someone could help in correcting my mistake in the code or is there any other better way to approach the same.</p>
  
  <pre><code>for k in ls !*1.txt ;
  do 
  k1=$( wc -l &lt; "$k" )
  done
  for i in ls *1.txt ;
  do 
  i1=$( wc -l &lt; "$i" )
  done
  if [ "$k1" != "$i1" ];
  then
  grep -vf "$i" "$k" |  mail -s "hi" example@hifi.com ;
  fi 
  </code></pre>