2 Simplified test
source | link

grep, 19

grep -qxE '(.+)\1+'

Test

while read; do 
  echo "$REPLY" | 
   <<<"$REPLY" grep -qxE '(.+)\1+' && \
    echo "$REPLY: true"t="true" || \t="false"
    echo "$REPLY: false"$t"
done < infile 

Output:

aa: true
aaa: true
abcabcabc: true
aba: false
ababa: false
weqweqweqweqweqw: false

grep, 19

grep -qxE '(.+)\1+'

Test

while read; do 
  echo "$REPLY" | 
    grep -qxE '(.+)\1+' && \
    echo "$REPLY: true" || \
    echo "$REPLY: false"
done < infile 

Output:

aa: true
aaa: true
abcabcabc: true
aba: false
ababa: false
weqweqweqweqweqw: false

grep, 19

grep -qxE '(.+)\1+'

Test

while read; do 
  <<<"$REPLY" grep -qxE '(.+)\1+' && t="true" || t="false"
  echo "$REPLY: $t"
done < infile 

Output:

aa: true
aaa: true
abcabcabc: true
aba: false
ababa: false
weqweqweqweqweqw: false
1
source | link

grep, 19

grep -qxE '(.+)\1+'

Test

while read; do 
  echo "$REPLY" | 
    grep -qxE '(.+)\1+' && \
    echo "$REPLY: true" || \
    echo "$REPLY: false"
done < infile 

Output:

aa: true
aaa: true
abcabcabc: true
aba: false
ababa: false
weqweqweqweqweqw: false