Question
Im trying to print out the certificates for all 100 websites from the top100.csv file however at this point I am only printing the first
Im trying to print out the certificates for all 100 websites from the top100.csv file however at this point I am only printing the first website. $ cat test.sh #!/bin/bash while read line do echo "Line is : $line" openssl s_client -showcerts -connect "$line:443" | grep Certificate done < top100.csv
Output: ./test.sh: line 1: $: command not found Line is : google.com depth=2 OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign verify return:1 depth=1 C = US, O = Google Trust Services, CN = Google Internet Authority G3 verify return:1 depth=0 C = US, ST = California, L = Mountain View, O = Google LLC, CN = *.google.com verify return:1 Certificate chain DONE
The top100.csv file contains the URL's for the top 100 websites for the script to run through. However, the script is only outputting the certificate for the first website, this being google.com. I need it to keep looping through the rest of the lines of the file.
I apologize in advance for any wording errors or misspelling.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started