I have a text file with a sequence of lines repeating multiple times. For example:
param id: 0
value: 2
description: "hello"
param id: 1
value: 3
description: "world"
I want to move description above value and change param id to one value higher, like param id 1 instead of 0. I want to do this using scripting. Can somebody help me with the commands that can achieve this?
sed
commands. – Anthony Geoghegan Apr 08 '16 at 15:51sed
is not the correct tool for it. May beawk
?? – MelBurslan Apr 08 '16 at 15:55