trimtrain is a Unix command-line utility written in C++ designed to normalize input columns of data, converting multiple spaces or tabs into a single space separator. This tool is useful for data scientists, developers, or anyone working with text files that require uniform spacing for proper alignment for further processing.
trimtrain is designed to be chained in pipelines with other unix tools
Before building trimtrain, ensure you have a C++ compiler (such as g++) and cmake installed on your system.
Clone the trimtrain repository from GitHub:
git clone https://github.com/jac18281828/trimtrain.git
cd trimtraintrimtrain uses a Makefile for easy compilation. To build the program, navigate to the cloned directory and use the make command:
mkdir -p build
cmake -H. -Bbuild -DPROJECT_NAME=trimtrain -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_VERBOSE_MAKEFILE=on -Wno-dev "-GUnix Makefiles"
make -jThis will compile the source code into an executable named trimtrain. To install trimtrain into your system's standard executable path, use:
sudo make installAfter installation, you can run trimtrain by piping input into it or specifying an input file. Here are some examples:
To normalize a file and output to standard output:
trimtrain < inputfile.txtTo normalize a file and save the output to another file:
trimtrain < inputfile.txt > outputfile.txtContributions to trimtrain are welcome! Here are some ways you can contribute:
- Reporting bugs
- Suggesting enhancements
- Adding new features
- Improving documentation
trimtrain is released under the BSD-3-Clause LICENSE