Skip to content

Instantly share code, notes, and snippets.

@sreejithbnaick
Created July 25, 2021 13:52
Show Gist options
  • Select an option

  • Save sreejithbnaick/ec3f358e80dcdad9323c77f7c0d8dce0 to your computer and use it in GitHub Desktop.

Select an option

Save sreejithbnaick/ec3f358e80dcdad9323c77f7c0d8dce0 to your computer and use it in GitHub Desktop.
Parallely check list of URLs are accessible using parallel and curl command
cat urls.txt | parallel 'x=`curl -I -s -o response.txt -w "%{http_code}" {}`; if [[ "$x" == "200" ]];then echo "{} OK";else echo "{} NOT OK";fi >> output.txt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment