Here are the steps to manually include unicode in ascii bash scripts.
- Go find the actual unicode character online that you want to use.
- run this: echo -ne 'paste_unicode_here' | hexdump
- The result is the hex output of the unicode
- Take the output, place \x before the bytes and use it in your script.
So, for example, if i wanted to use the "┡" character in something, this is what i'd run:
$echo -ne '┡' | hexdump 0000000 e2 94 a1 0000003 $echo -ne '\xe2\x94\xa1' ┡
No comments:
Post a Comment