Skip to content

Instantly share code, notes, and snippets.

@gin135
Last active January 10, 2017 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gin135/77f7382df5e9a06e90f092058a3f8ced to your computer and use it in GitHub Desktop.
Save gin135/77f7382df5e9a06e90f092058a3f8ced to your computer and use it in GitHub Desktop.
元号ジェネレータ( https://gist.github.com/hyuki0000/44d889b29a5320493e987020adfd8385 )のシェル芸版
#!/bin/sh
echo 万中久乾亀亨享仁保元勝化吉同和喜嘉国大天字安宝寛寿平康延建弘徳応感慶成承授政文斉昌明昭景暦正武永治泰白祚神祥禄禎福老至興衡観護貞銅長雉雲霊養 |
awk -vFS= 'BEGIN{OFS=","} NF=NF'     |
sed 's/.*/echo {&}{&}/'              |
bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment