OK, I have a script (someScript.sh) which contains some variables somewhere in it:
...
thisIsSomeVariable=someValue
...
anotherSomeVariable=someValue2
...
When I do this piped command:
grep SomeVariable= someScript.sh | cut -d"=" -f2
I get this output:
someValue
someValue2
However, when I do this:
echo `grep SomeVariable= someScript.sh | cut -d"=" -f2`
I just get
someValue2
With some of my better scripts, I get this correct output:
someValue someValue2
When I make use of this info, it somehow manages to toss in some "\b" characters and screws up the output of what I was trying to do. One person suggested that this may be due to the script being written on a windows machine and then being SFTPed into Linux. I've run vim and I can't find a single character that's screwed up. I can't use dos2unix because I don't have permission to install it. Can anyone please let me know of a different command that I can do to make this spaced values effect without the other values being chopped off? I'll be doing this to pass these values into an array.
All responses will be greatly appreciated.