I've created script, where I encoded string 28 times with base64. Then I wanted to echo count of chars in outputted string.
First I used ${#var} which gave me 34070.
Then I tried on the same string
script.sh | wc -c
which gave me 34071.
#!/bin/bash
var="9M"
for i in {1..28};do
var=$(echo $var | base64)
done
echo ${#var}
What exactly does make those two outputs different?