Skip to content

Instantly share code, notes, and snippets.

@gregoryvit
Last active January 10, 2018 15:07
Show Gist options
  • Save gregoryvit/2f711a4d8e8994a504bdac962cbe4dea to your computer and use it in GitHub Desktop.
Save gregoryvit/2f711a4d8e8994a504bdac962cbe4dea to your computer and use it in GitHub Desktop.
Print unicode code of symbol from clipboard (macOS)
#!/bin/bash
echo -n "$(pbpaste)" | iconv -f utf-8 -t utf-32be | xxd -p | sed 's/^0/0x/' | xargs printf 'U+%04X\n'
@gregoryvit
Copy link
Author

How to use:

  1. Copy 1 symbol to clipboard
  2. Run script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment