创建文件自动添加执行权限

编写脚本vix.sh

#!/bin/bash
filename=$1

if [[ ! -f $filename ]]
then
# 如果想脚本的添加执行环境也可在此添加
# echo '!/bin/python' > $filename
    touch $filename
else
    exec vim $filename
fi

chmod +x $filename
vim $filename

链接到/usr/local/sbin/下:

chmod +x vix.sh
mv vix.sh /usr/local/sbin/vix.sh
ln /usr/local/sbin/vix.sh /usr/local/sbin/vix