I have written a code to extract comma seperated values from a file and assign them to a variable inside awk code.i want to use one of these variable to be used in wget function i.e to pass the siteurl.How i can implement the shell command wget inside the awk for loop.code snippet is shown below.
Note:1.sitenames is a csv files name.
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;
# wget
www.real.com -o test.txt
for(j=0;j<nkeys;j++)
{
k=4;
keywords=ar[k+j];
print keywords;
}
}
}' sitenames
regards,
Raj