dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

kanji (244B)


      1 #!/bin/sh
      2 
      3 # outputs kanji in (utf-8) files to stdout
      4 
      5 # strip non-kanji
      6 regexp="s:[^\x{3400}-\x{4DB5}\x{4E00}-\x{9FCB}\x{F900}-\x{FA6A}]::g"
      7 # split each char onto a newline
      8 regexp="${regexp};s:(.):\1\n:g"
      9 
     10 cat "$@" | perl -CS -pe "${regexp}"