The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 09-28-2006
rajbal rajbal is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 19
Hi Marikle,
First of all thank you for your prompt response. Its giving the following error:
testawk.sh: line 19: syntax error near unexpected token `('
testawk.sh: line 19: ` nawk -v site_url=$siteurl '{system ("wget " site_url " -o test.txt)}''




I am attaching the full code :
awk -F, '{split($0,ar,",");

for(i=0;i<1;i++)
{ siteurl=ar[1];
size=ar[2];
nkeys=ar[3];
print siteurl;
print size;
print nkeys;
# echo $nkeys;
nawk -v site_url=$siteurl '{system ("wget " site_url " -o test.txt)}'

# system ( "wget ${siteurl} -o test.txt" )
# wget www.rhapsody.com -o test.txt
for(j=0;j<nkeys;j++)
{
k=4;
keywords=ar[k+j];
print keywords;
}
}
}' sitenames


Let me know where i am doing wrong?/
Regards,
Rajesh