I am using below code
#! /bin/bash for host in $(cat ./server.txt) do echo \"$host\" done
server.txt contains :
empty lines are not there because they are considered whitespaces used to separate word values.
use this:
awk '{print $1}' server.txt
server1.com server2.com server3.com server4.com