This C program, trimmy
, helps you verify trailing whitespaces at the end of lines in files. It's designed to be cross-platform and works on both Linux and Windows.
- Checks for trailing whitespaces at the end of lines.
- Handles multiple files specified as command-line arguments.
- Provides visual feedback using color highlighting.
- Prerequisites Ensure you have a C compiler (
gcc
) installed. - Compile
make
- Run
./trimmy file1.txt file2.txt
- Prerequisites
- Download and install the w64devkit for Windows. This provides Unix-like utilities like
rm
andgcc
that work with themakefile
.
- Download and install the w64devkit for Windows. This provides Unix-like utilities like
- Compile Open a command prompt or terminal and navigate to the project directory. Then, run:
make
- Run Use the compiled executable (
trimmy.exe
) to check your files:trimmy.exe file1.txt file2.txt
-
If a file contains trailing whitespaces:
- The file name will be displayed.
- Trailing whitespaces will be marked with a green
•
.
-
If a file does not contain trailing whitespaces:
- No output will be shown for that file.
FILE: my_code.c
1 | int main() {•••
3 | }••
This program is licensed under the MIT License. Refer to the LICENSE file for details.