arielf / cuts

Unix 'cut' (and 'paste') on steroids: more flexible select columns from files
Artistic License 2.0
66 stars 7 forks source link

cuts 1 ambiguity #8

Closed rr0gi closed 2 years ago

rr0gi commented 2 years ago

how to make cuts 1 index column 1 in stdin when file 1 is present?

$ touch 1
$ echo "a  b c" | cuts 1
<empty>

cuts :1 cuts - 1 do not work, nor does cuts /dev/stdin 1 PS actually worse: cuts - 1 gives answer "a" (expected "b"), I don't understand why

arielf commented 2 years ago

Thanks for the report. Current master should have a fix now.

commit 8e15d42566524f9c9f2ec05fbba66a59ddbe82cb (HEAD -> master, origin/master, origin/HEAD) Author: arielf arielf@users.noreply.github.com Date: Thu Mar 31 17:13:22 2022 -0700

cuts 1 ambiguity #8 fix:

- Give precedence to filename:column notation
- Refactor mapping of *.gz and `-` files
- Add regression tests for `cuts /dev/stdin:1` and `cuts -- -:1`
rr0gi commented 2 years ago

Thanks!