Created
February 13, 2021 04:01
-
-
Save sei0o/877f6453e67ee50c4d141c16c97bb874 to your computer and use it in GitHub Desktop.
http://www.ge.kochi-ct.ac.jp/~kyozai/hennyu/ のフォルダを整理する
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
#!/bin/bash | |
set B $PWD | |
set DIR $PWD/www.ge.kochi-ct.ac.jp/~kyozai/hennyu | |
for year in (seq 100)[8..26] | |
wget --mirror --no-parent http://www.ge.kochi-ct.ac.jp/~kyozai/hennyu/h{$year}/ | |
end | |
mv $DIR . | |
rm -rf www.ge.kochi-ct.ac.jp | |
rm hennyu/**/index.* hennyu/**/{t,T}humbs.db | |
for year in (seq 100)[8..26] | |
set D hennyu/h{$year} | |
mkdir -p $D/others | |
mv $D/*.{aux,dvi,nb,tex,log,eps,pbm,bmc} $D/others/ | |
for file in (ls -N $D/*) | |
mv $file ( | |
string replace koka "高知工科" $file | | |
string replace hok "北海道" | | |
string replace kyodai "京都" | | |
string replace kyoto "京都" | | |
string replace kyot "京都" | | |
string replace kyu "九州" | | |
string replace kge "九州芸術工科" | | |
string replace naga "長岡技科" | | |
string replace knag "神奈川" | | |
string replace toyo "豊橋技科"| | |
string replace ehime "愛媛" | | |
string replace ehi "愛媛" | | |
string replace tohk "東北"| | |
string replace syutodai "首都" | | |
string replace syutokyo "首都" | | |
string replace tokyo "東京"| | |
string replace tkyou "東京"| | |
string replace todai "東京"| | |
string replace ktky "東京(後期)"| | |
string replace tky "東京"| | |
string replace iba "茨城" | | |
string replace kgw "香川" | | |
string replace kks "京都工繊" | | |
string replace sen "京都工繊" | | |
string replace kobek "神戸・人間環境科学科" | | |
string replace kobe "神戸" | | |
string replace nago "名古屋" | | |
string replace h18osak "h18大阪工解答" | | |
string replace handaikisokou "大阪基礎工" | | |
string replace osa "大阪工" | | |
string replace handai-s "大阪工" | | |
string replace handaikou "大阪工" | | |
string replace osk "大阪基礎工" | | |
string replace okiso "大阪基礎工" | | |
string replace oki "大阪基礎工" | | |
string replace ofu "大阪府立" | | |
string replace okadaikou "岡山" | | |
string replace oka "岡山" | | |
string replace okaya "岡山" | | |
string replace toko "東京工業" | | |
string replace TOKO "東京工業" | | |
string replace toku "徳島" | | |
string replace tok "徳島" | | |
string replace tuk "筑波" | | |
string replace nok "東京農工" | | |
string replace ngk "名古屋工業" | | |
string replace sizu "静岡" | | |
string replace sz "静岡" | | |
string replace tiba "千葉" | | |
string replace kyo "京都" | | |
string replace syu "首都" | | |
string replace k徳島 徳島解答 | | |
string replace K徳島 徳島解答 | | |
string replace k愛媛 愛媛解答 | | |
string replace k神戸 神戸解答 | | |
string replace k豊橋技科 豊橋技科解答 | | |
string replace k東京工業 東京工業解答 | | |
string replace 'k.' "解答." | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment