sh任务

代码如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if [ -d $1 ]; then
echo ‘$! 已经存在’
exit
else
mkdir $1
cd $1
mkdir css js
touch index.html css/style.css js/main.js
echo \<\!DOCTYPE\> >> index.html
echo \<title\>hello\</title\> >> index.html
echo \<h1\>Hi\</h1\> >> index.html
echo h1\{color\: red\;\} >> css/style.css
echo var string \= \”Hello World\” >> js/main.js
echo alert\(string\) >> js/main.js
exit
fi
End