tidy things up

This commit is contained in:
Kyryl Melekhin
2021-07-13 21:07:53 +00:00
parent 6ea4f0f7ed
commit a7ee926770
3 changed files with 7 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
#!/bin/sh
regex="\
abc
@@ -38,7 +39,6 @@ a{5}
(abc+){5}|[0-9]{1,}
b[^c]*
"
input="\
abcdef
abcdef
@@ -78,7 +78,6 @@ abcabcabcabcabcabchsdfhsdh
62374623
djfjgjsdfjbshdhfhshd
"
expect="\
(0,3)
(2,5)
@@ -119,7 +118,6 @@ expect="\
(10,20)
(0,0)
"
c=1
echo "$regex" | tr '\n' | while read re; do
inp=$(echo "$input" | awk -v c=$c 'BEGIN{ RS = "" ; FS = "\n" }{print $c}')