The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 08-07-2007
matrixmadhan matrixmadhan is offline
Technorati Master
 

Join Date: Mar 2005
Location: k-tier distributed caching
Posts: 2,736
Code:
awk -F":" 'BEGIN{ while(getline < "passwordfile") { arr[$2]=i++ } }{ for ( i in arr ) { if ( i == $2 ) { cnt=1} } if ( cnt != 1 ) { print } cnt=0; }' userfile
Reply With Quote