A command-line tool to convert multi-line bash script into a single-line command.
- Lightweight and simple tool to use in the command lineš ļø.
- Output can be shown in CLI, copied to a clipboard, or saved to fileš„.
- Formatting can be preserved in the outputš.
Use bash (v3.2 or later), script functionality might break with earlier versions.
Clone and install
git clone https://github.com/Surajkumar88/Oneliner
cd Oneliner/src
make install
To install in a custom directory
make DESTDIR=path/to/directory install
NOTE: You may have to run this as root.
To uninstall
cd Oneliner/src
make uninstall
git [-f | --file <file_path>] [-options <value>]
Options Expected Value Description
-f, --file source path path to the source file with the code to convert
-o, --output file path save the output to file oneliner_out.txt in the given path (defaults to current working directory)
-p, --print on/off verbose output in CLI
-m, --multiline on/off output/copy file contents with source formatting
-c, --copy on/off copy the output in clipboard
-h, --help display this help and exit
-v, --version show version for Oneliner