https://github.com/2color/cut
cut cli tool implemented in D Programming Language
https://github.com/2color/cut
bash cli dlang dlang2
Last synced: over 1 year ago
JSON representation
cut cli tool implemented in D Programming Language
- Host: GitHub
- URL: https://github.com/2color/cut
- Owner: 2color
- Created: 2014-07-29T18:19:06.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-13T17:10:39.000Z (almost 12 years ago)
- Last Synced: 2025-03-26T06:35:43.195Z (over 1 year ago)
- Topics: bash, cli, dlang, dlang2
- Language: D
- Homepage:
- Size: 207 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cut
cut cli tool implemented in D2
## compiling
`dmd cut.d optionsparser.d`
## running tests
```shell
dmd cut.d optionsparser.d -unittest
./cut
```
Make sure that you see the following lines
```
tests: Cut passed ✓
tests: CutOptionsParser passed ✓
```
## Usage Example
```
./cut -b 1-7 data.log
./cut -f -3 -d " " data.log
./cut -f -3,6,7 -d " " data.log
./cut -f -3,6,7 -d " " --complement data.log
```
## Performance comparsion to the original cut
```
./cut -f 2- -d " " /var/log/install.log > benchmark.log 1.55s user 0.08s system 92% cpu 1.770 total
cut -f 2- -d " " /var/log/install.log > benchmark.log 2.00s user 0.07s system 98% cpu 2.096 total
```