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