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