This command will return the length of STRING.
string length "friend"
Would return 6
string length "plum"
Would return 4
NOTE: To read content from standard input we use the -i -
option.
echo -n "friend" | string -i - length
Would return 6
echo -n "plum" | string -i - length
Would return 4