Last active
March 22, 2017 08:02
-
-
Save arc279/5fd5f42dd725a145bd6a71ff3ddec968 to your computer and use it in GitHub Desktop.
bashで黒魔道士
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| while read x; do | |
| fold -s1 <<<"$x" | while read y; do | |
| [ ! -z $y ] && printf "\x1b[%dm \x1b[0m" $((y+40)) || printf " " | |
| done | |
| echo | |
| done <<EOD | |
| 00 | |
| 00330 | |
| 033320 | |
| 0033320 | |
| 003333220 | |
| 000000033332220 | |
| 0333333332222220 | |
| 02222333322220 | |
| 0002222333200 | |
| 00002222220 | |
| 030000022220 | |
| 00300300002220 | |
| 04000030000400 | |
| 040000000000040 | |
| 044400044444440 | |
| 00444444400040 | |
| 0330444440044440 | |
| 03304444033044440 | |
| 004404403304440 | |
| 040440040044440 | |
| 040444440044440 | |
| 044044440044440 | |
| 044404444044440 | |
| 0444400444044040 | |
| 044444444444004440 | |
| 0000000000000000 | |
| EOD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment