shell脚本+x

时间:2016-05-14 01:24:15   收藏:0   阅读:1079
#!/bin/bash
#
if [  -f $1 ];then  echo "file already exist" && exit
else touch $1 && chmod +x $1
fi
cat>>$1<<EOF
#!/bin/bash
#Author:
#Date & Time: `date +"%F %T"`
EOF
vim +5 $1
创建sh文件并加上x权限

            


评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!