> Home > Scripts > AWK >

Output records from the original file where the first 10 characters match "FRANK GRAY"

 

#!/usr/bin/ksh

#

#  AWK script source file

#  Created by:   Jeffery J. Jimes

#  Date:         08/22/2001

#  Name:         match_first10.awk

#  Usage:  $ awk -f match_first10.awk sourcefile > outfile

#

########################################################

 

{

    if ( substr($0,1,10) == "FRANK GRAY" )
    print $0
}