I have a text file with the following format. The first line is the \"KEY\" and the second line is the \"VALUE\".
KEY 4048:1736 string
3
KEY 0:1772 string
1
Another solutions using vim (just for reference).
Solution 1:
Open file in vim vim filename, then execute command :% normal Jj
This command is very easy to understand:
After that, save the file and exit with :wq
Solution 2:
Execute the command in shell, vim -c ":% normal Jj" filename, then save the file and exit with :wq.