Get all distinct Character in a string

In this blog, Sharing code to get only unique Characters present in a string. Please do not get confused with my Previous Blog . Its a different topic all together. Consider a String “allabouttechnologies“, so the distinct or unique Characters of this String are “alboutechngis“. str=”alllabouttechnologies” ##Sample Stringnewstr=” ##Blank new Stringn=${#str} ## Length of a Stringi=0while [[ $i -le $n ]] ##looping Character by CharacterdoChar=${str:$i:1}CharCntInNewStr=echo ${newstr}| grep ${Char} | wc -l ##Checking if Character already exists in new Stringif [[ $CharCntInNewStr -eq “0” ]]thennewstr=${newstr}${str:$i:1} ## appending Character if it is…