Skip to content

Instantly share code, notes, and snippets.

@nna774
Last active October 31, 2017 10:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nna774/36ed3e1a2e6697aba2c471df95446322 to your computer and use it in GitHub Desktop.
Save nna774/36ed3e1a2e6697aba2c471df95446322 to your computer and use it in GitHub Desktop.
天気予報を保存します。
#! /bin/bash -xe
BASE="/home/nona7/codes/tenki"
DATE=`date +'%Y/%m/%d'`
JIKKYO="${BASE}/data/${DATE}-jikkyo12.txt"
TSUHO="${BASE}/data/${DATE}-tsuho12.txt"
mkdir -p "${BASE}/data/`date +'%Y/%m'`"
wget http://www.data.jma.go.jp/fcd/yoho/gyogyou/jikkyo12.txt -O "${JIKKYO}"
nkf -w --overwrite "${JIKKYO}"
wget http://www.data.jma.go.jp/fcd/yoho/gyogyou/tsuho12.txt -O "${TSUHO}"
nkf -w --overwrite "${TSUHO}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment