码迷,mamicode.com
首页 > 系统相关 > 详细

shell脚本+x

时间:2016-05-14 01:24:15      阅读:1079      评论:0      收藏:0      [点我收藏+]

标签:bash   shell   

#!/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权限

            


shell脚本+x

标签:bash   shell   

原文地址:http://493689359.blog.51cto.com/4305089/1773090

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!