I'm looking for a way to remove carriage returns on the line prior to the sed match. For example, I'd like to remove the carriage return prior to any instance of "[".
Sample input:
MESSAGE: Location
latitude
[-Pi/4,Pi/4]
longitude
[-Pi,Pi]
altitude
[10000,120000]
Sample output:
MESSAGE: Location
latitude [-Pi/4,Pi/4]
longitude [-Pi,Pi]
altitude [10000,120000]
Any suggestion using sed, tr or awk would be appreciated. Thanks.