Okay so basically I want to be able to use a text file with this format:
www.website.com 443 123.456.789.098
www.website2.com 443 765.432.101.234
....
as a source of input in which the script will take the website address and hold it in a variable and the same thing with the port and Ip address. So it would look like this:
website=www.website.com
port=443
ip=123.456.789.098
So far, I have tried this:
for line in [ cat $file_name ]; do
website=`echo $line | cut -d" " -f1`
port=`echo $line | cut -d" " -f2`
ip=`echo $line | cut -d" " -f1`
But when i echo out the the variables all i get is this:
[
[
[
I can't seem to figure out how to go about solving this issue.