编写生成脚本基本格式的脚本,包括作者,联系方式,版本,时间,描述等

#!/bin/bash
[ -z "$1" ] && echo "please put in you shell name." && exit 1
[ -f $1 ] && rm -f $1
touch $1
read -p "author: " author
read -p "telephone: " telephone
read -p "version: " version
read -p "describe: " describe
echo "#!/bin/bash" >> $1
echo "#author:${author}" >> $1
echo "#telephone:${telephone}" >> $1
echo "#version:${version}" >> $1
echo "#describe:${describe}" >> $1
发布了27 篇原创文章 · 获赞 0 · 访问量 882

猜你喜欢

转载自blog.csdn.net/apple2417/article/details/103323058
今日推荐