Bash Last Carriage character, newline character stripping
I have the following bash script:
#!/bin/bash

FILE="p.txt"

    while read line; do
    	export http_proxy="http://$line"
    	wget http://www.example.com
    done < $FILE

the problem is, it gives the following error:

    http://80.251.247.14:3128
    : Bad port number.y URL http://80.251.247.14:3128

I think it is because of last character, either it is newline \n or \r, how can I fix this?


Bash Last Carriage character, newline character stripping
===

I have the following bash script:
#!/bin/bash

FILE="p.txt"

    while read line; do
    	export http_proxy="http://$line"
    	wget http://www.example.com
    done < $FILE

the problem is, it gives the following error:

    http://80.251.247.14:3128
    : Bad port number.y URL http://80.251.247.14:3128

I think it is because of last character, either it is newline \n or \r, how can I fix this?

