摘要: 一、下载链接地址: https://dev.mysql.com/downloads/mysql/ #下载完成后直接解压即可 二、windows下初始化MySQL 1、把MySQL的解压路径加入到系统环境变量中 2、把MySQL设置为windows服务 C:\Users\test>mysqld --i 阅读全文
posted @ 2017-12-14 16:43 風£飛 阅读(1029) 评论(0) 推荐(0) 编辑
摘要: sh test.sh、source test.sh与. test.sh(./test.sh)执行命令的区别:sh是启用子shell执行而source与.(点)是在当前窗口执行unset A:清除变量中存储的内容系统环境变量配置文件执行顺序:/etc/profile >/etc/profile.d/ 阅读全文
posted @ 2017-12-14 16:00 風£飛 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 函数的返回值用return,脚本的返回值用exit shell函数只允许返回数字,若不是则报line 6: return: num: numeric argument required;若是写了return,则返回return语句后跟的数值,若是没有return语句则返回最后一个命令的执行结果 Sh 阅读全文
posted @ 2017-12-14 15:55 風£飛 阅读(371) 评论(0) 推荐(0) 编辑
摘要: [root@web01 scripts]# man console_codesecho -e "\033[背景颜色;字体颜色m字符串\033[0m",例:echo -e "\033[41;36m something here \033[0m"注: 1、背景颜色和字体颜色之间是英文的“;” 2、文字颜 阅读全文
posted @ 2017-12-14 15:36 風£飛 阅读(658) 评论(0) 推荐(0) 编辑
摘要: [root@nginx ~]# sh /etc/scripts/process.sh #!/bin/bash FILENAME=`basename $0 .sh` #获取脚本文件名称,不包含.sh后缀 FILEPATH=`dirname $0` echo "PID of this script: $ 阅读全文
posted @ 2017-12-14 15:23 風£飛 阅读(299) 评论(0) 推荐(0) 编辑