title: How to find non-printable characters in the file?
body: <p>I tried to find out the unprintable characters in data filein unix.
  Code :</p>
  
  <pre><code>#!/bin/ksh
  export SRCFILE='/data/temp1.dat'
  while read line 
  do
  len=lenght($line)
  for( $i = 0; $i &lt; $len; $i++ ) {
  
          if( ord(substr($line, $i, 1)) &gt; 127 )
          {
              print "$line\n";
              last;
          }
  done &lt; $SRCFILE
  </code></pre>
  
  <p>The code is not working , please help me in getting a solution for the above query.</p>