Last active
August 29, 2015 14:13
-
-
Save nukos/0fcc62c87f39a4cb8ae3 to your computer and use it in GitHub Desktop.
CSVの行に一括で日付を追加する
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
# すべての行の先頭に日付を追加 | |
LC_ALL=C sed -i -e 's/^/2014\/12\/08,/g' 2014-12-08.csv | |
# 先頭行の項目名を日付に修正する | |
LC_ALL=C sed -i -e '1s/^2014\/12\/08/日付/g' 2014-12-08.csv | |
# 月ごとにCSVを結合する | |
cat 2014-12-*.csv > 2014-12.csv | |
# すべてのCSVを結合する | |
cat 201*-*-*.csv > all.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment