集合各种linux命令,实现某个功能,常用于自动化运维等。
[root@localhost test1]# cd /opt/
[root@localhost opt]# vim shell.sh
#!/bin/bash
echo "please input your name:"
read uname
echo "input your password:"
read upwd
echo "name:$uname, pwd:$upwd"
#readonly name="py"
#defined variale
name="ppy"
unset name
[root@localhost opt]# chmod a+x shell.sh
bash -n shell.sh
[root@localhost opt]# ./shell.sh
crontab -e
#分时日月周 命令 脚本 #* * * * * /bin/bash /opt/shell2.sh
crontab -l -u root
原文:https://www.cnblogs.com/pycrab/p/9420479.html