Shell流程控制 1、if判断 if [ 条件判断式 ];then 程序 fi 或者 if [ 条件判断式 ] then 程序 fi 注意:[ 条件判断式 ],中括号和条件判断式之间有空格 2、case语句 case $变量名 in "值1") 如果变量的值等于1,则执行程序1 ;; "值2") ...
分类:
系统相关 时间:
2020-07-07 19:43:05
阅读次数:
139
[BJDCTF2020]EzPHP 解码:http://794983a5-f5dc-4a13-bc0b-ca7140ba23f3.node3.buuoj.cn/1nD3x.php 源代码: <?php highlight_file(__FILE__); error_reporting(0); $fi ...
分类:
Web程序 时间:
2020-07-06 16:34:32
阅读次数:
111
https://www.cnblogs.com/echo-valley/p/8268527.html ls -lt /dirname/ |grep filname | head -n 1 | awk '{print $9}' ls -lt /dirname/ 获取文件并按时间先后排序 grep fi ...
分类:
系统相关 时间:
2020-07-03 19:08:29
阅读次数:
66
//文件转换为字节 public static byte[] File2Bytes(string path) { if (!System.IO.File.Exists(path)) { return new byte[0]; } FileInfo fi = new FileInfo(path); b ...
分类:
其他好文 时间:
2020-07-03 17:09:28
阅读次数:
69
命令+路径 #!/bin/bash # 需求:循环复制文件到集群所有节点的相同目录下 # 使用方式:脚本+需要复制的文件名称 #脚本编写大致步骤 #1 获取传入脚本的参数,参数个数 paramnum=$# if((paramnum==0)); then echo no args; exit; fi ...
分类:
系统相关 时间:
2020-07-01 23:53:45
阅读次数:
86
#!/bin/bash ms=`date +%-H%M` if ((10#$1 <= 10#$ms));then echo "future time,please" exit 0 fi while ((10#$1 != 10#$ms)) do ms=`date +%H%M` if ((10#$1-1 ...
分类:
其他好文 时间:
2020-06-30 20:56:18
阅读次数:
74
对于任何物联网DIY项目来说,Wi-Fi都是必不可少的工具包,毕竟没有网络,我们如何能称之为物联网系统呢?在物联网系统中,我们常使用的设备就是Arduino和树莓派,Arduino价格相比较于树莓派来说价格低不少,是很多学习者的香饽饽,但是Arduino并没有Wi-Fi模块,如果添加Wi-Fi防护罩... ...
分类:
其他好文 时间:
2020-06-29 18:45:22
阅读次数:
154
https://www.cnblogs.com/cute/archive/2011/08/26/2154137.html 1、判断字符串为空 if [ -z "$str" ]; then echo "empty string" fi 2、判断文件是否存在 if [ -f /home/builder/ ...
分类:
系统相关 时间:
2020-06-29 13:44:40
阅读次数:
107
1、判断1.1 if语句if condition;then commandfi示例:#!/bin/bashif [ `ps -elf | grep -c ssh` -gt 1 ]; then echo "true"fi命令行展示:if [ `ps -elf | grep -c ssh` -gt 1 ...
分类:
系统相关 时间:
2020-06-28 00:39:18
阅读次数:
78
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