Brifly
cat 1.txt | sed -E "s/(.{1})/\1\n/g" | sort | uniq
Example:
cd /dev/shm/
echo "Hello_world" > /dev/shm/1.txt
cat 1.txt
cat 1.txt | sed -E "s/(.{1})/\1\n/g" | sort | uniq -с
S means substitute
S/str2replace/replacment/g g-means globaly
() is groupe
dot means any character
{1} exactly 1 character
All together
s/(.{1})/\1\n/g means replace any character exactly one with itself and char(10) that represents newline.