随笔分类 -  【Linux | shell】

摘要:#!/bin/bash ############################################################################## # File Name : Linux system config # description : This script is used to set linux system # Author... 阅读全文
posted @ 2018-12-17 15:17 Simon92 阅读(1018) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash #set -x #date: 2018-12-13 #Description: 一键安装LNMP环境 or LAMP 环境 #Version: 0.4 #Author: simon #定义命令搜索路径 PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin ex... 阅读全文
posted @ 2018-12-13 10:55 Simon92 阅读(290) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash #================================================================ # Copyright (C) 2018 All rights reserved. # # File::lnmp_install.sh # Author:zhurui # Date:2018/12/13 # De... 阅读全文
posted @ 2018-12-13 10:36 Simon92 阅读(217) 评论(0) 推荐(0) 编辑
摘要:前言 前面我们介绍了Jenkins来发布项目通过nginx来展示流程,那里只是提供了一个简单的测试脚本,接下来呢介绍一下一个比较完善的发布脚本,该脚本可实现从gitlab服务器获取代码,打包,部署到WEB服务器,回滚到任意版本,一键回滚到上一版本。脚本可以当做模板来套用,屡试不爽,enjoy吧!! 阅读全文
posted @ 2017-01-17 16:16 Simon92 阅读(1811) 评论(0) 推荐(0) 编辑
摘要:Shell模板 阅读全文
posted @ 2017-01-17 15:53 Simon92 编辑
摘要:Linux shell脚本编程 1 流程控制: 2 循环语句:for,while,until 3 4 while循环: 5 6 while CONDITION; do 7 循环体 8 done 9 10 进入条件:当CONDITION为“真”; 11 退出条件:当CONDITION为“假”; 12 阅读全文
posted @ 2016-03-01 09:30 Simon92 阅读(2126) 评论(0) 推荐(0) 编辑
摘要:Linux shell脚本编程(二) 1 练习:求100以内所有偶数之和; 2 使用至少三种方法实现; 3 4 示例1: 5 6 #!/bin/bash 7 # 8 declare -i sum=0 #声明一个变量求和,初始值为0 9 10 for i in $(seq 0 2 100); do 1 阅读全文
posted @ 2016-03-01 09:07 Simon92 阅读(855) 评论(0) 推荐(0) 编辑
摘要:1 Linux shell脚本编程: 2 守护进程,服务进程:启动?开机时自动启动: 3 交互式进程:shell应用程序 4 5 广义:GUI,CLI 6 GUI: 7 CLI: 8 词法分析:命令,选项,参数 9 内建命令: 10 外部命令:PATH 11 fork()创建为一个进程: 12 13 阅读全文
posted @ 2016-03-01 09:03 Simon92 阅读(902) 评论(1) 推荐(1) 编辑