#!/bin/bash

#Input filename
INPUT="urls.txt"
#Internal Field Separtor
while IFS=$'\n' 
#Read a line while it's not 0
read -r line || [ -n "$line" ]; 
do
  echo "Testing $line"
  #Do curl stuff with line, -o output to dev/null -s silent -I header -w write out http_code
  statusCode=$(curl -s -o /dev/null -I -w "%{http_code}" $line)
  echo "Code: $statusCode"
 done < "$INPUT"

