typedb: add more advanced examples with dummy-polymorphism of cut / sort

This commit is contained in:
Michael Sippel 2023-10-03 04:19:33 +02:00
parent bd5f469682
commit 1ab8db590b
Signed by: senvas
GPG key ID: F96CF119C34B64A6

56
typedb
View file

@ -24,30 +24,10 @@
::seq \(-s\|--separator\) : [0-9]*
<1: <Seq >~<Seq <PosInt 10 BigEndian>~<Seq <Digit 10>~Char>~<SepSeq Char ':'>~<Seq Char>
::sort -n\( .*\)*
>0: <Seq >~<Seq <PosInt 10 BigEndian>~<Seq <Digit 10>~Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq >~<Seq <PosInt 10 BigEndian>~<Seq <Digit 10>~Char>>~<SepSeq Char '\n'>~<Seq Char>
::sort -M\( .*\)*
>0: <Seq Month~LocaleShortMonth~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq Month~LocaleShortMonth~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::sort\( .*\)*
>0: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::\(head\|tail\)\(\| .*\)
>0: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::cut -d[ ]*: -f[0-9]*
>0: <Seq <Seq <Seq Char>>~<SepSeq Char ':'>~<Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::cut -d[ ]*/ -f[0-9]*
>0: <Seq <Seq <Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::ls\( .*\)* -l\( .*\)
<1: <Seq FileInfo>~<Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
@ -116,10 +96,46 @@
>0: <Seq Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<SepSeq Char ':'>~<Seq Char>
<1: <Seq Date~<TimeSince UnixEpoch>~<Duration Seconds>~~<PosInt 10 BigEndian>~<Seq <Digit 10>~Char>>~<SepSeq Char '\n'>~<Seq Char>
::xargs -d[ ]*: stat -c %[WXYZ],%n
>0: <Seq Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<SepSeq Char ':'>~<Seq Char>
<1: <Seq <Tuple Date~<TimeSince UnixEpoch>~<Duration Seconds>~~<PosInt 10 BigEndian>~<Seq <Digit 10>~Char> ',' Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::xargs -d[ ]*: stat -c %[wxyz]
>0: <Seq Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<SepSeq Char ':'>~<Seq Char>
<1: <Seq Date~ISO-8601~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::sort -t, -k1 -n
>0: <Seq <Tuple Date~<TimeSince UnixEpoch>~<Duration Seconds>~~<PosInt 10 BigEndian>~<Seq <Digit 10>~Char> ',' Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq <Tuple Date~<TimeSince UnixEpoch>~<Duration Seconds>~~<PosInt 10 BigEndian>~<Seq <Digit 10>~Char> ',' Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::cut -d[ ]*, -f[ ]*1
>0: <Seq <Tuple Date~<TimeSince UnixEpoch>~<Duration Seconds>~~<PosInt 10 BigEndian>~<Seq <Digit 10>~Char> ',' Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq Date~<TimeSince UnixEpoch>~<Duration Seconds>~~<PosInt 10 BigEndian>~<Seq <Digit 10>~Char>>~<SepSeq Char '\n'>~<Seq Char>
::cut -d[ ]*, -f[ ]*2
>0: <Seq <Tuple Date~<TimeSince UnixEpoch>~<Duration Seconds>~~<PosInt 10 BigEndian>~<Seq <Digit 10>~Char> ',' Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::cut -d[ ]*: -f[0-9]*
>0: <Seq <Seq <Seq Char>>~<SepSeq Char ':'>~<Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::cut -d[ ]*/ -f[0-9]*
>0: <Seq <Seq <Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::sort -n\( .*\)*
>0: <Seq >~<Seq <PosInt 10 BigEndian>~<Seq <Digit 10>~Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq >~<Seq <PosInt 10 BigEndian>~<Seq <Digit 10>~Char>>~<SepSeq Char '\n'>~<Seq Char>
::sort -M\( .*\)*
>0: <Seq Month~LocaleShortMonth~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq Month~LocaleShortMonth~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::sort\( .*\)*
>0: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
<1: <Seq <Seq Char>>~<SepSeq Char '\n'>~<Seq Char>
::xargs rm\( .*\)*
>0: <Seq Path~<Seq PathSegment~<Seq Char>>~<SepSeq Char '/'>~<Seq Char>>~<SepSeq Char '\n'>~<Seq Char>