added README

This commit is contained in:
Lu 2023-07-02 15:30:07 +02:00
parent 8aa32c2510
commit 869057ec6c
2 changed files with 46 additions and 2 deletions

View File

@ -1,4 +1,4 @@
name: echo-rs CI name: cat-rs CI
on: on:
push: push:
@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up echo-rs - name: Set up cat-rs
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install cargo-audit - name: Install cargo-audit
run: cargo install cargo-audit run: cargo install cargo-audit

44
README.md Normal file
View File

@ -0,0 +1,44 @@
# cat-rs
My rewrite of the cat GNU core utility in rust
version: 0.1.0
author: [Lu Baumann](https://blog.surferlul.me/)
## usage
refer to `cat-rs -h`:
```
Concatenate file(s) to standard output
Usage: cat-rs [OPTIONS] [FILES]...
Arguments:
[FILES]... With no file, or when file is -, read standard input
Options:
-A, --show-all equivalent to -vET
-b, --number-nonblank number nonempty output lines, overrides -n
-e equivalent to -vE
-E, --show-ends display $ at end of each line
-n, --number number all output lines
-s, --squeeze-blanks suppress repeated empty output lines
-t equivalent to -vT
-T, --show-tabs display TAB character as ^I
-u (ignored)
-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB
-h, --help Print help (see more with '--help')
-V, --version Print version
```
## testing
test script requires python >= 3.10
`gnu_cat_tests/test.py -e /bin/cat -b <path/to/cat-rs>`
| parameter | value |
| ---------------- | -------------------------------------- |
| `-c`, `--cat` | path to cat executable to test against |
| `-b`, `--binary` | path to cat-rs binary to test |