From my understanding, it is possible to convert any bash script into a single line by inserting semi-colons at the end of each line of code and removing the new-line.
Firstly - am I correct in this assumption?
Secondly, are there any tools/scripts that do this function automatically?
Note: I do not want to change any command in the Bash script, not optimize to change to pipe-based commands, nothing. Keep it as is, and be able to run it. This is a unique situation in which I must have it in a single line no matter what.
I have tried looking online, over Google or GitHub, but was left empty-handed.
The tool I am currently using for this purpose is ChatGPT, which given the 40 or so lines of Bash per automation, is capable of turning it into a single Bash line that executes the same.
There could be differences as ChatGPT isn't inherently correct, but I have yet to find any.