I have the following input:
Value1|Value2|Value3|Value4@@ Value5|Value6|Value7|Value8@@ Value9|etc...
In my bash script, I would like to replace "@@" with a new line. I tried different things with sed, but I had no luck:
line=$(echo ${x} | sed -e $'s/@@ /\\\n/g')
Ultimately, I need to parse all this input into strings and values. Maybe I'm wrong. I planned to replace "@@" with new lines and then scroll through the input with IFS = '|' to separate values. If there is a better way, tell me, I'm still starting with shell scripts.
Thanks!
unix bash shell sed
odinsride
source share