The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #10 (permalink)  
Old 10-31-2006
gopskrish gopskrish is offline
Registered User
 

Join Date: Jun 2005
Posts: 26
Hi Anbu,

I was off for few days and hence the delay in replying.
I tried your stuff but I am getting this error
awk -v check_val="$1" '{
if( $0==check_val) { key[$0]++ }
if(key[$0] < 2 ) print $0
}' inputfile > outputfile

awk: syntax error near line 1
awk: bailing out near line 1

I created a script test and fired it like ksh test.ksh cattle

I am using korn shell. Do i need to make some changes for that ?

Thanks in advance.

cheers,
gops
Reply With Quote