diff --git a/.github/workflows/echo-rs-ci.yml b/.github/workflows/echo-rs-ci.yml index f26088f..ceedf5f 100644 --- a/.github/workflows/echo-rs-ci.yml +++ b/.github/workflows/echo-rs-ci.yml @@ -1,4 +1,4 @@ -name: echo-rs CI +name: cat-rs CI on: push: @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up echo-rs + - name: Set up cat-rs uses: actions/checkout@v2 - name: Install cargo-audit run: cargo install cargo-audit diff --git a/README.md b/README.md new file mode 100644 index 0000000..adab4c4 --- /dev/null +++ b/README.md @@ -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 ` + +| parameter | value | +| ---------------- | -------------------------------------- | +| `-c`, `--cat` | path to cat executable to test against | +| `-b`, `--binary` | path to cat-rs binary to test |