Table of Contents
tinyutils are minimum commands.
Developing now
Flats input streams.
$ seq 5 | flat
1 2 3 4 5
$ seq 5 | flat -n 2
1 2
3 4
5
$ seq 5 | flat -d ,
1,2,3,4,5
Repeat input stream.
$ rep 5 A
AAAAA
$ echo 'A B' | rep 5 -i
A BA BA BA BA B
$ rep 1 3 5 A
A
AAA
AAAAA
$ rep $(seq 5) A
A
AA
AAA
AAAA
AAAAA
% rep 5 5 5 5 A -d ,
A,A,A,A,A
A,A,A,A,A
A,A,A,A,A
A,A,A,A,A
Unicode cut.
$ echo 1あ2あ3 | ucut -d あ -f 1,2
1 2
$ echo 1,2,3,4,5 | ucut -d , -f 1,3,5
1 3 5
$ echo 1,2,3,4,5 | ucut -d , -f 1,3-
1 3 4 5
$ echo 1,2,3,4,5 | ucut -d , -f 2-4
2 3 4
$ echo 1,2,3,4,5 | ucut -d , -f 1,3-5
1 3 4 5
$ echo 1,2,3,4,5 | ucut -d , -f 1,2,1,2,3-
1 2 1 2 3 4 5
go get github.com/jiro4989/tinyutils/cmd/...
# or
GO111MODULE=off go get github.com/jiro4989/tinyutils/cmd/...
or
Download binary from Releases.