2018年3月30日
摘要: str="taolue@126.com"echo "len="${#str} #字符串长度 expr index $str 'ba' #字符串查找不正确 echo ${str:3:6} #从第3个向后数6个截取 expr match $str '\(^[a-z]{1,}@[0-9]{1,}\.[a- 阅读全文
posted @ 2018-03-30 16:19 编程男孩 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1.条件表达式:整数 l == -eq>= -ge> -gt<= -le< -lt!= -nt2.条件语句if [ 表达式 ]then elif[表达式]then else fi例子:count=10if [ $count -gt 10 ]then echo "count>10"elif [ $co 阅读全文
posted @ 2018-03-30 16:19 编程男孩 阅读(275) 评论(0) 推荐(0) 编辑
摘要: shell编程1.监控内存,生成日志2.数据库定时备份3.邮件的监控4.定时发邮件5.开机执行(启动Apache,启动mysql) 文件类型:1.创建couse1.sh文件写入:count=5 //等号前后千万不要加空格echo $count保存wq2.赋予权限chmod a+x couse1.sh 阅读全文
posted @ 2018-03-30 16:18 编程男孩 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 常用命令:1.查看目录:ls ls -a 包含隐藏目录 ls -l 显示详细信息,-开头为文件 d开头为目录 蓝色为目录 绿色为可执行文件 黑色(白色):普通文件2.看帮助: man 命令名 q 退出3.看当前目录: pwd 看在哪个目录下4.进入目录 cd 目录名 绝对目录 / 相对目录 .当前目 阅读全文
posted @ 2018-03-30 16:17 编程男孩 阅读(90) 评论(0) 推荐(0) 编辑
摘要: var nodemailer = require('nodemailer');var transporter = nodemailer.createTransport({ //https://github.com/andris9/nodemailer-wellknown#supported-serv 阅读全文
posted @ 2018-03-30 16:11 编程男孩 阅读(103) 评论(0) 推荐(0) 编辑