Skip to content

Instantly share code, notes, and snippets.

@kirkins
Created August 21, 2017 18:12
Show Gist options
  • Save kirkins/3480057821b5f2c03f0f6d5ce18ad00e to your computer and use it in GitHub Desktop.
Save kirkins/3480057821b5f2c03f0f6d5ce18ad00e to your computer and use it in GitHub Desktop.
Get all emoji
#!/usr/bin/env bash
#
# Get a list of all Unicode emoji in version 6.0
wget -O output.txt http://www.unicode.org/Public/emoji/6.0/emoji-data.txt
sed -i '/^#/ d' output.txt # Remove comments
sed -i 's/.*(//' output.txt # Remove columns not needed
sed -i 's|[(),]||g' output.txt # Remove brackets
sed -i 's/\(.*[^ ]\)[ ]*\(.*\)/\2 \1/' output.txt # Move first column to last
sed -i '/^$/d' output.txt # Remove blank lines
# Break lines with 2 entries into 2 lines
sed -i 's/\.\.\([^ ]*\) *\(.*\)\.\./\t\2\n \1\t/' output.txt
sed -i "s/[[:space:]]\+/ /g" output.txt # Format spacing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment