I have the following data, and I need to put it all into one line.
I have this:
22791 ; 14336 ; 22821 ; 34653 ; 21491 ; 25522 ; 33238 ; >
If the data is in file.txt, then:
echo $(
The '$(' reads the file and gives the contents as a series of words which 'echo' then echoes with a space between them. The 'tr' command then deletes any spaces:
$(' reads the file and gives the contents as a series of words which 'echo' then echoes with a space between them. The 'tr' command then deletes any spaces:
22791;14336;22821;34653;21491;25522;33238;