A simple command-line tool written in Go for processing text input and files, inspired by Unix utilities. It handles standard input, file concatenation, and line numbering.
- Standard Input:
- Print input as-is (
-). - Number non-empty lines (
-b). - Number all lines (
-n).
- Print input as-is (
- File Handling:
- Read and print single file contents.
- Concatenate and print multiple files.
- Go installed on your system.
git clone https://github.com/TG199/ccat.gitmake buildmake test- Read from standard in
./bin/ccat-
Process files
Single file
./bin/ccat test.txt
Multiple files
./bin/ccat test.txt test2.txt ...
-
Number lines
Number lines as they are printed
head -n3 test.txt | ./bin/ccat -nNumber empty lines
sed G test.txt | ./bin/ccat -n | head -n4
Exclude empty lines
sed G test.txt | ./bin/ccat -b | head -n5
make cleanContributions are welcome! Feel free to submit a pull request or open an issue.
This project is open-source and available under the MIT License.