Skip to content

Instantly share code, notes, and snippets.

@akanehara
Last active April 14, 2016 05:24
Show Gist options
  • Save akanehara/f825ed52508c33e993d0427b9876b305 to your computer and use it in GitHub Desktop.
Save akanehara/f825ed52508c33e993d0427b9876b305 to your computer and use it in GitHub Desktop.
2016休日 (土・日・祝・振替休日)
{ 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
@akanehara
Copy link
Author

brew install coreutils gnu-sed gawk homebrew/dupes/grep nkf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment