1.oracle 用户环境: 主库: [oracle@hzmtx admin]$ cat ~/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi ...
分类:
数据库 时间:
2020-06-28 00:20:49
阅读次数:
82
1.语法格式 1.1 最基本的格式 if [ condition ];then 符合if时执行的语句 fi 1.2 扩展格式 if [ condition ];then 符合该if时执行的语句 elif [ condition ];then 符合该if时执行的语句 else 都不符合时执行的语句 f ...
分类:
系统相关 时间:
2020-06-25 19:51:49
阅读次数:
70
本贴记录写shell脚本的时候踩的那些细节坑: 1.变量赋值不要加空格 a=1 #right a = 1 #wrong 2.if判断语句 [] 之间要加空格 if["$1"] then echo "有第一个参数" else echo “没有第一个参数” fi 隐蔽的错误,bash命令执行脚本的时候, ...
分类:
系统相关 时间:
2020-06-24 23:32:11
阅读次数:
80
批量执行检查脚本: #!/bin/bash file_name="$1" if [ -z "$file_name" ];then echo "Pls input file path" exit 1 fi cat "$file_name"| while read line do hadoop fsck ...
分类:
其他好文 时间:
2020-06-24 17:58:36
阅读次数:
56
本文展示了ThinkPHP6 上传图片代码demo, 代码亲测可用. HTML部分代码 1 <tr> 2 <th class="font-size-sm" style="width:15%;height:100px;">商品图片</th> 3 <td> 4 <div class="custom-fi ...
分类:
Web程序 时间:
2020-06-24 00:04:40
阅读次数:
204
#!/bin/bash #1 获取输入参数个数,如果没有参数,直接退出 pcount=$# if((pcount==0));then echo no args; exit; fi #2 获取文件名 p1=$1 fname=`basename $p1` echo fname=$fname #3 获取上 ...
分类:
其他好文 时间:
2020-06-23 21:30:54
阅读次数:
71
官网 一、简介 Fiddler是比较好用的web代理调试工具之一,它能记录并检查所有客户端与服务端的HTTP/HTTPS请求,能够设置断点,篡改及伪造Request/Response的数据,修改hosts,限制网速,http请求性能统计,简单并发,接口测试,辅助自动化测试,等等。 二、工作原理 fi ...
分类:
其他好文 时间:
2020-06-23 15:57:09
阅读次数:
129
一、只从文件读取 [root@rhel8 shell]# cat ping.sh #!/bin/bash # 判断是否有输入参数 if [ $# -eq 0 ];then # basename:只输出路劲的最后一个名称 echo -e "\033[34mUsage: `basename $0` fi ...
分类:
系统相关 时间:
2020-06-22 15:26:20
阅读次数:
171
Shell学习 第一节 基本语法 变量 表达式 判断语句 If表达式 一、先来看一个简单的shell程序: mkdir test cd test/ vim example01.sh example.sh #!/bin/bash等于#!/bin/sh (#!跟shell命令的完全路径。 作用: 显示后 ...
分类:
系统相关 时间:
2020-06-21 20:05:24
阅读次数:
71