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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-26-2008
karthickrn karthickrn is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 19
Post Can anyone solve this awk issue ?

awk -F^ '{ if (($1 != "X") && ($5 != "3")) || if (($1 != "S") && ($5 != "2")) print $0}' abc> xyz

The above command returns this error

awk: syntax error near line 1
awk: illegal statement near line 1


I am newbie to awk, Any awk intelligence involved in correcting this issue is highly appreciated.

Thanks in advance.