Skip to content

Instantly share code, notes, and snippets.

@dantleech
Created August 7, 2017 21:43
Show Gist options
  • Save dantleech/1445aa317333dd82de94154cb5033b59 to your computer and use it in GitHub Desktop.
Save dantleech/1445aa317333dd82de94154cb5033b59 to your computer and use it in GitHub Desktop.
#!/bin/bash
# locate CharName.pm
egrep -i "^[0-9a-f]{4,} .*$*" /usr/lib/x86_64-linux-gnu/perl5/5.24/Unicode/CharName.pm | while read h d; do /usr/bin/printf "\U$(printf "%08x" 0x$h)\tU+%s\t%s\n" $h "$d"; done
@dantleech
Copy link
Author

dantleech commented Aug 7, 2017

Can't remember where I found the above, but it's pretty cool, first install this library

sudo apt-get install libunicode-string-perl

and then add the above script to your path (e.g. /usr/local/bin/ugrep

$ ugrep "check"
x       U+237B  NOT CHECK MARK
x       U+2447  OCR AMOUNT OF CHECK
x       U+2611  BALLOT BOX WITH CHECK
x       U+2713  CHECK MARK
x       U+2714  HEAVY CHECK MARK
x       U+10102 AEGEAN CHECK MARK

Where x is the unicode character that github apparently does not allow in a code block ✔

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