I have a text file like inputfolder/abc.txt
Input (Below is just an example - the actual file will have many lines which will vary everytime):
abcdefgh~
asdfghjkliuy~
qwertyuiopasdfgh~
..........
Every line ends with '~' and I would like to merge all the lines into one
Desired output:
abcdefgh~asdfghjkliuy~qwertyuiopasdfgh~...............
How can I merge all the lines into one line using shell script? (I don't want to add any extra character)
Once all the lines are merged, the file should be moved to another folder.
Example: OutputFolder/abc.txt