Last active
April 14, 2016 05:24
-
-
Save akanehara/f825ed52508c33e993d0427b9876b305 to your computer and use it in GitHub Desktop.
2016休日 (土・日・祝・振替休日)
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
{ echo '2016/03/21' '振替休日'; | |
curl -s http://www8.cao.go.jp/chosei/shukujitsu/syukujitsu.csv | | |
nkf | | |
gtail -n+3 | | |
gawk -F',' '$2{print$2,$1}{fflush()}' | | |
while read d s; do echo "$(gdate -d"$d" +'%Y/%m/%d') $s"; done; | |
gseq 20160101 20161231 | | |
gdate -f - +'%Y/%m/%d %w' 2> /dev/null | | |
gawk '$2=="0"{print$1,"日曜日"}$2=="6"{print$1,"土曜日"}{fflush()}'; | |
} | gsort -k1,1 -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brew install coreutils gnu-sed gawk homebrew/dupes/grep nkf