Skip to content

Instantly share code, notes, and snippets.

@takahashilabo
Last active August 29, 2015 14:02
Show Gist options
  • Save takahashilabo/890a5278e2bc19747dd7 to your computer and use it in GitHub Desktop.
Save takahashilabo/890a5278e2bc19747dd7 to your computer and use it in GitHub Desktop.
count the number of alphabets of a file
#!/bin/bash
while read -s -n 1 char
do
echo $char
done < $1 | sort | uniq | wc -l | awk '{print $1}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment