Hi
I've got a script which retrieves a web page (using cURL) and then splits the resultant file into sections (using csplit) but I'm having difficulty getting awk to strip the html tags out so that I am left with the required data.
I've tried using the following:
{ BEGIN {charchk = "[<&]"}
i = 1
while i <= NF
{
if ((substr($i,1,1) !~ charchk )
{
print $i
}
}
++i
}
(with various combinations of brackets and loops but it will not run:
"syntax error near unexpected token `((substr($i,1,1)"
I tried the recent related post but could get the link to freefriends to work.
Any advice appreciated.
I've got a script which retrieves a web page (using cURL) and then splits the resultant file into sections (using csplit) but I'm having difficulty getting awk to strip the html tags out so that I am left with the required data.
I've tried using the following:
{ BEGIN {charchk = "[<&]"}
i = 1
while i <= NF
{
if ((substr($i,1,1) !~ charchk )
{
print $i
}
}
++i
}
(with various combinations of brackets and loops but it will not run:
"syntax error near unexpected token `((substr($i,1,1)"
I tried the recent related post but could get the link to freefriends to work.
Any advice appreciated.