I have the following input:
Value1|Value2|Value3|Value4@@ Value5|Value6|Value7|Value8@@ Value9|etc...
In my bash script I would like to replace
I recommend using the tr function
echo "$line" | tr '@@' '\n'
For example:
[itzhaki@local ~]$ X="Value1|Value2|Value3|Value4@@ Value5|Value6|Value7|Value8@@" [itzhaki@local ~]$ X=`echo "$X" | tr '@@' '\n'` [itzhaki@local ~]$ echo "$X" Value1|Value2|Value3|Value4 Value5|Value6|Value7|Value8