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 -->
  #5 (permalink)  
Old 05-02-2007
Mandab Mandab is offline
Registered User
 

Join Date: Apr 2007
Posts: 22
Thank you for your quick response, I tried replacing as you said but still I am getting errors. The script is :
#!/bin/ksh

awk -F"<tab>" 'NR>=3 {
if ( $2 ~ /^ *$/ ) printf("102")
if ( $4 ~ /^ *$/ ) printf("104)
printf("\n")
}' $1

Errors I am getting:
$ test7 test1.txt
awk: newline in string near line 3
awk: syntax error near line 4
awk: illegal statement near line 4
Reply With Quote