在我们进行自动发现的时候,总会有一个脚本来获取端口等信息,并返回json格式,那以redis为例,下边是redis进行进行自动发现的脚本redisport=(`psaux|grep-wredis-server|grep-v"grep"|awk-F‘:‘‘{print$NF}‘`)portnum=${#redisport[@]}count=`hostname|grep"\-SQ"|wc-l`if[$
分类:
Web程序 时间:
2019-11-21 21:24:15
阅读次数:
121
后台给我写了一个上传图片的接口,自己用form表单测试成功 接口可以正常跳转 测试的代码: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus® ...
分类:
Web程序 时间:
2019-11-21 19:53:11
阅读次数:
98
把第一列相同的名称的第二列加起来: [root@localhost cc]# cat 1.txtaaa 10 bbb 20aaa 30ccc 40ccc 20ccc 40 [root@localhost cc]# cat 1.txt |awk '{sum[$1]+=$2}END{for(i in s ...
分类:
其他好文 时间:
2019-11-20 13:00:24
阅读次数:
61
1、在 /etc/profile 加上一段shell 步骤1、vi /etc/profile 2、i 进入命令行模式 3、在最后加上下面这段文字 history USER=`whoami` USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed ...
分类:
系统相关 时间:
2019-11-20 12:33:53
阅读次数:
103
1基础用法awk-F:‘{print$1}‘/etc/passwd#显示passwd的用户名awk-F:‘$NF=="/bin/bash"{print$1,$NF}‘/etc/passwd#显示出shell为"/bin/bash"的用户awk‘BEGIN{print"开头"}{print$0}END{print"结束"}‘/etc/passwd#BENGIN可以理解为页头,END理解为页脚df-h
分类:
其他好文 时间:
2019-11-19 18:48:57
阅读次数:
142
A - Single Push if 、 else 特判 #include <stdio.h> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <queue> #include ...
分类:
其他好文 时间:
2019-11-19 17:15:05
阅读次数:
75
/** * @ClassName MvcConfigure * @Description SpringMVC配置 * @Author JAGNG * @Date 2019/10/28 10:23 **/ @Configuration public class MvcConfigure impleme ...
分类:
编程语言 时间:
2019-11-19 17:13:16
阅读次数:
87
一、原集群操作: 1、hdfs创建目录hdfs dfs -mkdir /tmp/hive-export 2、hive导出表命令hive -e "use 库;show tables" | awk '{printf "use 库;export table %s to @/tmp/hive-export/ ...
分类:
其他好文 时间:
2019-11-19 15:46:28
阅读次数:
380
// // ViewController.swift // Label // // Created by 赵士军 on 2019/11/18. // Copyright © 2019 赵士军. All rights reserved. // import UIKit class ViewContro ...
分类:
移动开发 时间:
2019-11-19 15:42:36
阅读次数:
105
django admin配置以及使用 知识预览 admin组件使用 admin源码解析 admin组件使用 Django 提供了基于 web 的管理工具(django 2.0+, python3.6+)。 Django 自动管理工具是 django.contrib 的一部分。你可以在项目的 sett ...
分类:
其他好文 时间:
2019-11-19 13:56:16
阅读次数:
82