time=$ (date +%y%m%d) mkdir $ time cd $time touch 0.txt touch 0.ctouch 0.cctouch 0.cpptouch 0. htouch makefiletouch 0.sh echo "#include <stdio.h>" >> 0. cecho "#include <stdlib.h>" >>0.cecho "Void fun ()" >> 0.cecho "{" >> 0.cecho " " >> 0.cecho "}" >> 0. cecho "Int main ()" >>0.cecho "{" >> 0.cecho "return 0; " >> 0.cecho "} " >> 0.cfor s in $*;d o echo $s >> 0.cdoneecho "#include <stdio.h>" >> 0.ccecho "#include <stdlib.h> " >>0.ccecho " #include <iostream> " >>0.ccecho " Using namespace std; " >>0.ccecho "Void fun ()" >> 0.ccecho "{" >> 0.ccecho " " >> 0.ccecho "}" >> 0.ccecho "Int main ()" >>0.ccecho "{" >> 0.ccecho "return 0; " >> 0.cecho "}" >> 0.ccfor s in $*;d o echo $s >> 0.ccdoneecho #include <stdio.h> >> 0.cppecho #include <stdlib.h> >>0.cppecho #include <iostream> >>0.cppecho #using namespace std; " >>0.cppecho "Void fun ()" >> 0.cppecho "{" >> 0. cppecho " " >> 0.cppecho "}" >> 0.cppecho "Int main () " >>0.cppecho "{" >> 0.cppecho "return 0; " >> 0. cppecho "}" >> 0.cppfor s in $*;d o echo $s > > 0.cppdoneecho << ' com ' >> 0.makefileecho ' ' > > 0.makefileecho "com " >> 0.makefileecho "##########" >> 0.makefileecho "WZ:" >> 0.makefileecho "@g++ m *.cpp *.h" >> 0.makefileecho ". Phony " >> 0.makefileecho " clean: " >> 0.makefileecho " @rm m " >> 0.makefilefor s in $*;d o echo $s >> 0.makefiledoneecho "#include <stdio.h>" >> 0.hecho "#include <stdlib.h>" >>0.hecho #include <string.h> >>0.hecho #include <time.h> " >>0.hecho #include <math.h> >>0.hecho #include <iostream> >>0.hecho "#using namespace std;" >>0.hfor s in $*;d o echo $s >> 0.hdone
Shell file Self-write