https://github.com/lennart1978/cntr
cntr: A CLI command that prints a file or data from a pipe centered to stdout. Written in C
https://github.com/lennart1978/cntr
c cli-app linux-app
Last synced: 6 months ago
JSON representation
cntr: A CLI command that prints a file or data from a pipe centered to stdout. Written in C
- Host: GitHub
- URL: https://github.com/lennart1978/cntr
- Owner: Lennart1978
- License: mit
- Created: 2025-04-12T16:13:09.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-12T16:44:38.000Z (6 months ago)
- Last Synced: 2025-04-15T23:15:12.296Z (6 months ago)
- Topics: c, cli-app, linux-app
- Language: C
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cntr
cntr: A CLI command that prints a file or data from a pipe centered to stdout. Written in C
## example:
```bash
./cntr text.txt
cat text.txt | ./cntr
```
## Compile:
```bash
gcc -s -O3 -lm cntr.c -o cntr
```
### Install:
```bash
sudo cp cntr /usr/bin
```
### An (senseless) example:
```bash
ifconfig | cntr
enp3s0: flags=4163 mtu 1500
inet 192.168.2.100 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 2003:db:370c:8200:c640:5ce7:5aff:7728 prefixlen 64 scopeid 0x0
inet6 fde2:8acd:e9d3:0:f4e5:1702:e03a:7f92 prefixlen 64 scopeid 0x0
inet6 fe80::226d:6e25:92c:f10 prefixlen 64 scopeid 0x20
ether a8:a1:59:3b:4b:5b txqueuelen 1000 (Ethernet)
RX packets 257343 bytes 351672699 (335.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 107295 bytes 11908385 (11.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 2 bytes 160 (160.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 160 (160.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```
**File "cntr" is a compiled Linux x86_64 binary**