Build a Bash script to test URLs
Budget: $30 – $250 USD
Develop a Bash script for a Linux environment that loops through a hardcoded list of URLs. Each URL will attempt to download a specific document (cURL). URLs should be called asynchronously (in parallel). The script should report a success or failure status for each download as it becomes available.
The script will not accept any arguments. It will feature a hardcoded list of key/value pairs:
"my document 1" : "https://url-to-document-1...",
"my document 2" : "https://url-to-document-2...",
"my document 3" : "https://url-to-document-3...",
The script should report the status of each download as it becomes available and track the duration of each request. The output should look like this:
SUCCESS: my document 1 (duration 20ms)
SUCCESS: my document 2 (duration 20ms)
ERROR: my document 3 (status code 400 - duration 10ms)
trying URL: https://url-to-document-4...
trying URL: https://url-to-document-5...
trying URL: https://url-to-document-6...
SUCCESS should output in green. ERROR should output in red. I am unable to provide the actual URLs so please develop with publically available documents. I will insert the real URLs after delivery.
The script will not accept any arguments. It will feature a hardcoded list of key/value pairs:
"my document 1" : "https://url-to-document-1...",
"my document 2" : "https://url-to-document-2...",
"my document 3" : "https://url-to-document-3...",
The script should report the status of each download as it becomes available and track the duration of each request. The output should look like this:
SUCCESS: my document 1 (duration 20ms)
SUCCESS: my document 2 (duration 20ms)
ERROR: my document 3 (status code 400 - duration 10ms)
trying URL: https://url-to-document-4...
trying URL: https://url-to-document-5...
trying URL: https://url-to-document-6...
SUCCESS should output in green. ERROR should output in red. I am unable to provide the actual URLs so please develop with publically available documents. I will insert the real URLs after delivery.