I'm working with a bash script. In it I need to split a string based in the following separator: "\r\n". I tried the following:
MY_STRING='firsttext\r\nsecondtext\r\nthirdtext'
IFS='\r\n' read -ra my_array <<< "$MY_STRING"
But is not working, it split the string with the letter 'r' rather than '\r\n'. Do I need to express the separator in another way?