The first shell program runs, tutorial from: http://jingyan.baidu.com/article/8cdccae947f83e315413cd05.html
The code is as follows:
1 #!/bin/sh2touch a.txt3sleep4 echo"testtesttesttest">>a.txt
I don't know why. Tip: MSYS2 terminal has stopped working. Not yet resolved.
And then use the Git pull code
1#!/bin/Bash2#mkdirJiu Yuhao3 #cd Jiu Yuhao4 #git Init5#git Pull https://Git.coding.net/rio56/wf.git Master6 7Declare-a map= (["ran Hua"]="Https://git.coding.net/Dawnfox/wf.git"8["Objective"]="Https://git.coding.net/liusx0303/CountWords.git"9["Hu Yuongong"]="Https://coding.net/u/huyr000/p/countWord/git"Ten["Wang Chao"]="Https://git.coding.net/SuperCodingChao/wfProject.git" One["Gao Yuanbo"]="Https://coding.net/u/Rainbows/p/wc/git" A["Chen Jianyu"]="Https://coding.net/u/MR__Chen/p/Demo/git" -["Daiqiutong"]="Https://git.coding.net/a284617374/soft.git" -["fangming"]="Https://coding.net/u/MingZi-/p/cipingtongji/git" the["Gomei"]="Https://git.coding.net/gmyznb/wordcount1.git" -["Huang Zeyu"]="Https://coding.net/u/huangzy_95/p/wf/git" -["Nancy Male"]="Https://git.coding.net/lynlynyess/Wordcount.git" -["Jayaj"]="Https://git.coding.net/jyj5951/wf.git" +["Jiangshan"]="Https://coding.net/u/js2017102865/p/StreamReader/git" -["Chamboven"]="Https://git.coding.net/zbwd666/zbwd.git" +["Li Shunkang"]="Https://git.coding.net/lick468/wf.git" A["Li Yuan Yuan"]="Https://git.coding.net/lyy181/count.git" at["Shiming"]="Https://git.coding.net/Hitagi123/word-count.git" -["Liu Chengzhi"]="Https://git.coding.net/liuchengzhi0944/word_dirt.git" -["Liu Yaoze"]="Https://coding.net/u/liuyz349/p/word_count/git" -["Savo"]="Https://git.coding.net/immixiaomi/wf.git" -["Miao Wei"]="Https://git.coding.net/Vrocker/wf.git" -["Ren Jia"]="Https://coding.net/u/rensijia/p/count-words/git" in["Shaoxio"]="Https://coding.net/u/ss505072461/p/wf/git" -["Songyu"]="Https://coding.net/u/songyuu/p/python_wf/git" to["penstock on downstream"]="Https://git.coding.net/tianjiping/11111.git" +["Wang Flight"]="Https://git.coding.net/wangh013/wordNumber.git" -["Wang Lei"]="Https://git.coding.net/137911934/SE20170914.git" the["Wang Weidong"]="Https://git.coding.net/wangwd/SecondAssignment.git" *["wangyuling"]="Https://coding.net/u/tutu123/p/tutu1234/git" $["Wu Yudan"]="Https://git.coding.net/clairewyd/wf.git"Panax Notoginseng["Xu Jianbin"]="Https://git.coding.net/xushaobin/ConsoleApplication3.git" -["Yang Zirie"]="Https://git.coding.net/Vector121/homework.git" the["Shang"]="Https://git.coding.net/yuanyue2017102885/wordcount_1and2.git" +["Jiu Yuhao"]="Https://git.coding.net/Rio56/wf.git" A["Zhang Enzu"]="Https://git.coding.net/ZhangEJ/wf.git" the["Shing"]="Https://git.coding.net/szjzsd/123.git" + ) - $ forKeyinch${!map[@]}; Do $ mkdir$key - CD $key - git init the git pull ${map[$key]} master - CD..Wuyi Done the - Wu#Echo${!map[@]} - # About#Echo${map[@]} $ # -# forKeyinch${!map[@]}; Do -# #Echo${map[$key]} -#Echo$key; A# Done View Code
The resulting folder is garbled:
The shell script has a little knowledge, but see it also has variable definitions and so on, not yet learned.
Learn http://www.runoob.com/linux/linux-shell.html after leaving a tutorial
Hope to have encountered such problems of the predecessors to help answer ~
Shell Script First Learning