Touch shell script and modify to 777 permission

Time:2020-10-22

mksh.sh

#!/bin/bash

for i in "[email protected]"
do
        touch ${i}
        chmod 777 ${i}
        echo "#!/bin/bash">${i}
done

mkcpptest.sh

#!/bin/bash

for i in "[email protected]"
do
        touch ${i}
        echo '#include<iostream>
#include<ctime>

using namespace std;

int main(int argc, char** argv){
    return 0;
}'>${i}
done
#Create
cppF=time;./mkcpptest.sh ${cppF}.cpp &&vi ${cppF}.cpp;g++ -g ${cppF}.cpp -o ${cppF}.out
#Do not create
cppF=time;vi ${cppF}.cpp;g++ -g ${cppF}.cpp -o ${cppF}.out