This seems like it should be stupid easy but I can't seem to get it to work! I have a string I want to divide into an array based on new lines.
This below is basically what I'm trying to do.
echo $devices
serial1 device
serial2 device
arr=$(magic_function $devices)
echo ${arr[0]}
serial1 device
echo ${arr[1]}
serial2 device