- Nov 28, 2000
- 2,224
- 0
- 0
Lets say i have this data:
123
1245
265
sgdfg
bla
4235
sdaf
sag
smdm
sklmdsf
kmsd
bla2
I want to move bla2 to where bla is, and bla where bla2 is...
if i use sed -e '/bla/h' -e '/bla2/x' DATAFILE it changes the last one to bla...
is there a way to exchange the two lines?
Thanks in advance!!
123
1245
265
sgdfg
bla
4235
sdaf
sag
smdm
sklmdsf
kmsd
bla2
I want to move bla2 to where bla is, and bla where bla2 is...
if i use sed -e '/bla/h' -e '/bla2/x' DATAFILE it changes the last one to bla...
is there a way to exchange the two lines?
Thanks in advance!!