I have the following script:
#!/bin/bash
for line in $('curl -s https://scans.io/data/rapid7/sonar.http/20141209-http.gz | zcat | head -n 1000 | dap json + select vhost + lines');
do
echo "$line\n"
done
For which I am trying to achieve the following:
- Loop through a dynamically growing list of results from the scans.io curl
- Output the line which I then propose to pass to PHP to store and process
However I'm getting syntax error near unexpected token
$'\r''` but am not a BASH expert to know what I need to tweak.