The below awk script (loop.awk) is in the cygwin home directory. I do a cd to the directory where the Sources.txt is (where I would like the data output in), but the script does not run:
echo loop | ./loop.awk
loop.awk
#!/bin/awk -f
BEGIN {}
cat Sources.txt | while read a
do
//generate a uniquefilename//
wget ${a} > //uniquefilename//
done
END {}
I am new to awk and trying to learn. Thank you in advance :).
Basically, the code connects to each website and downloads the source code for each in a separate output file.
awk '!a[$0]++{print "wget",$0}' html.txt | sh
--2014-10-07 13:25:34-- https://www.genedx.com/test-catalog/available-tests/edar-gene-sequencing/
Resolving www.genedx.com (www.genedx.com)... 104.130.145.205
Connecting to www.genedx.com (www.genedx.com)|104.130.145.205|:443... connected.
ERROR: The certificate of `www.genedx.com' is not trusted.
ERROR: The certificate of `www.genedx.com' hasn't got a known issuer.
I am not sure how to add this certificate in chrome. I am going to be downloading from multiple sites does a unique certificate need to be used for each or is there a better way? Thanks.
@blastif.fr
Out of curiosity, what shell do you know that uses the following syntax? //generate a uniquefilename// as a comment or external command and then as a file //uniquefilename//
awk '!a[$0]++{print "wget"--no-check-certificate,$0}' html.txt | sh
sh: line 1: wget-1: command not found
sh: line 2: wget-2: command not found
sh: line 3: wget-3: command not found
sh: line 4: wget-4: command not found
sh: line 5: wget-5: command not found
sh: line 6: wget-6: command not found
sh: line 7: wget-7: command not found
sh: line 8: wget-8: command not found
sh: line 9: wget-9: command not found
sh: line 10: wget-10: command not found
sh: line 11: wget-11: command not found