Last active
August 31, 2015 13:42
-
-
Save greymd/c4c1a6c3df31c83a6970 to your computer and use it in GitHub Desktop.
This file contains 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
# 参考: https://twitter.com/ryuichiueda/status/637570756138823680 | |
W=9; H=9 ;printf $(printf "+%%0${W}d\\\n%0${H}s\n" | sed "s/ /|%${W}s\\\n+%0${W}d\\\n/g") | sed 's/0/---+/g' | sed 's/ / |/g' | |
# 結果 | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ | |
# | | | | | | | | | | | |
# +---+---+---+---+---+---+---+---+---+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment