cat ip_list | while read line
do
$(/usr/bin/nc -v -z $line >>/dev/null)
if [ $? -eq 0 ];then
echo $line >> success.txt
else
echo $line >> fulure.txt
fi
done
2023-11-08 15:05:22
cat ip_list | while read line
do
$(/usr/bin/nc -v -z $line >>/dev/null)
if [ $? -eq 0 ];then
echo $line >> success.txt
else
echo $line >> fulure.txt
fi
done