I have two variables declared as follows:
export portNumber=8888^M
export loginIP_BASE=10.1.172.2^M
I'm trying to print them both on a single line seperated by a colon ':' with the following script. It should look like "10.1.172.2:8888"
echo -n 'Login IP:'
echo -n $loginIP_BASE
echo -n ':'
echo $portNumber
but it it prints out the following:
:8888 IP:10.1.172.2
Why is it doing that and how can I get it to do what I want? Also, the variables are preexisting from another file, so i did not write them myself. What does the "^M" do?