#!/bin/bashprocessLine(){ line="$@" # get all args traceroute -I -z 5 -w 2 $line}### Main script stars here #### Store file nameFILE=""# Make sure we get file name as command line argumentif [ "$1" == "" ]; then echo "Usage: fqdn_traceroute.sh filename"; exit 0;else FILE="$1" # make sure file exist and readable if [ ! -f $FILE ]; then echo "$FILE : does not exists" exit 1 elif [ ! -r $FILE ]; then echo "$FILE: can not read" exit 2 fifi# read $FILE using the file descriptors# Set loop separator to end of lineBAKIFS=$IFSIFS=$(echo -en "\n\b")exec 3<&0exec 0<"$FILE"while read -r linedo # use $line variable to process line in processLine() function processLine $linedoneexec 0<&3# restore $IFS which was used to determine what the field separators areIFS=$BAKIFSexit 0