首页 > 解决方案 > Shell Scipt 仅运行 100 个站点的证书的单次迭代,它应该运行 100 次

问题描述

脚本:

$ 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

top100.csv 文件包含脚本要运行的前 100 个网站的 URL。但是,该脚本仅输出第一个网站的证书,即 google.com。我需要它来循环遍历文件的其余行。

对于任何措辞错误或拼写错误,我提前道歉。

标签: shellssl-certificate

解决方案


推荐阅读