码迷,mamicode.com
首页 >  
搜索关键字:sed 解读之 n 与$!n    ( 9913个结果
centos7下安装harbor
1、修改基础环境 更改主机名,关闭防火墙和selinux hostnamectl set-hostname 7niu systemctl stop firewalld systemctl disable firewalld setenforce 0 sed -i 's/SELINUX=enforci ...
分类:其他好文   时间:2020-06-18 10:27:39    阅读次数:139
the vm session was closed before any attempt to po
the vm session was closed before any attempt to power it on
分类:其他好文   时间:2020-06-18 00:57:12    阅读次数:53
第三周
1.使用sed命令打印出/etc/passwd文件中的奇数行内容 sed -n '1~2p' /etc/passwd 2.使用sed命令将/etc/passwd文件从2到10行中的bin替换成linux ? sed -n '2,10s/bin/linux/p' /etc/passwd 3.使用sed ...
分类:其他好文   时间:2020-06-17 23:27:57    阅读次数:68
1074 Reversing Linked List (25分)
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, ...
分类:其他好文   时间:2020-06-17 23:12:36    阅读次数:57
Python机器学习(二十)决策树系列三—CART原理与代码实现
ID3,C4.5算法缺点 ID3决策树可以有多个分支,但是不能处理特征值为连续的情况。 在ID3中,每次根据“最大信息熵增益”选取当前最佳的特征来分割数据,并按照该特征的所有取值来切分, 也就是说如果一个特征有4种取值,数据将被切分4份,一旦按某特征切分后,该特征在之后的算法执行中, 将不再起作用, ...
分类:编程语言   时间:2020-06-17 20:29:17    阅读次数:57
C# read and compute the code lines number of cs files based on given directory
static void ComputeCodeLines() { string dir = @"D:\Work"; int totalLines = 0; string[] allFiles = Directory.GetFiles(dir, "*.cs", SearchOption.AllDire ...
分类:Windows程序   时间:2020-06-17 12:48:11    阅读次数:67
sed
sed命令 sed是一种流编辑器,它是文本处理中非常中的工具,能够完美的配合正则表达式使用,功能不同凡响。处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”(pattern space),接着用sed命令处理缓冲区中的内容,处理完成后,把缓冲区的内容送往屏幕。接着处理下一行,这样不断重复,直 ...
分类:其他好文   时间:2020-06-17 12:37:29    阅读次数:82
linux 记录所有系统用户bash操作日志
记录所有用户登录系统的任何操作日志,以便有据可查。1.编辑/etc/profile文件vim/etc/profilehistoryUSER=`whoami`USER_IP=`who-uami2>/dev/null|awk‘{print$NF}‘|sed-e‘s/[()]//g‘`if["$USER_IP"=""];thenUSER_IP=`hostname`fiif[!-d/var/log/
分类:系统相关   时间:2020-06-17 10:43:12    阅读次数:63
linux 记录所有系统用户bash操作日志
记录所有用户登录系统的任何操作日志,以便有据可查。1.编辑/etc/profile文件vim/etc/profilehistoryUSER=`whoami`USER_IP=`who-uami2>/dev/null|awk‘{print$NF}‘|sed-e‘s/[()]//g‘`if["$USER_IP"=""];thenUSER_IP=`hostname`fiif[!-d/var/log/
分类:系统相关   时间:2020-06-17 10:33:52    阅读次数:61
shell脚本
#!/bin/bash echo "1. 对服务器硬件的监控" echo " 能够对服务器CPU进行监控,并输出CPU的信息" cpu=`cat /proc/cpuinfo |head -n 17` echo "CPU的信息为$cpu" echo " " echo " 2.能够对服务器内存进行监控, ...
分类:系统相关   时间:2020-06-16 21:54:51    阅读次数:70
9913条   上一页 1 ... 41 42 43 44 45 ... 992 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!