AWK 详解

摘要:文本处理工具:grep,sed,awkgrep,egrep,fgrep:文本过滤工具:parrernsed:行编辑器          模式空间,保持空间awk:报表生成器,格式化文件输出          awk:Aho,Weinberger,Kernighan-->New  AWK, NAWKGNU awk ->gawkAWK位置:      &n

 sed mage讲义

摘要:sed:Stream Editor,行编辑器:一次只处理一行文本,不会编辑修改原文件,每处理一行文本都会将文本复制到patternspace:模式空间中处理        用法:sed [option] ...  'script' inputfile ...            script:         

 史上最邪恶的shell脚本!没有之一!

摘要:微博上的朋友 @马甲与小号告诉我发现了一个奇怪的东西,本着好奇心使人进步(害死猫?)的目的,我去观摩了一番,于是就有了今天这篇文章。 这是一个 bash shell 脚本,其中有若干可以整蛊(结仇)你的同事的小技巧——或者说恶作剧。看完之后,感觉不寒而栗,要是谁敢这样整我,我一定和他绝交! 警告,切勿在生产环境体验,一切后果自负!警告,切勿在生产环境体验

 批量导入官方YUM_GPG-KEY脚本: import_OS_GPG_key.sh

摘要:#!/bin/bash#Usage: /bin/bash  import_OS_GPG_key.sh#Create 2017-07-07 By RuanShengChang #Mail:rscpass@163.com#Used for CentOS5.x CentOS6.x CentOS7.x#info:download CentOS   GPG Key and import to SystemErrorCentOS5(){cd /etc/pki/rpm-gpgcurl -O -L https://www.centos.org/keys/RPM-GPG-KEY-CentOS-5for i in /etc/pki/rpm-gpg/RPM-GPG-KEY-CentO

 批量添加用户和密码随机密码

摘要:#!/bin/bashuserchars="old"for num in `seq 3`do        useradd $userchars$num        passwd=`date|md5sum|cut -c3-20`        echo "$passwd"|passwd --stdin $userchars$num        echo -e "u

 运维工具大全[图片]

摘要:

 SNMP客户端自动安装脚本

摘要:#!/bin/bashecho "Install snmp client"sleep 1yum install net-snmp* -yll /etc/snmp/snmpd.confcp /etc/snmp/snmpd.conf  /etc/snmp/snmpd.conf.oricat >/etc/snmp/snmpd.conf<<EOFcom2sec local  localhost   publiccom2sec mynetwork 10.0.0.0/24  publicgroup MyRWGroup v1       localgroup MyRWG

 puppet客户端自动安装shell脚本

摘要:#!/bin/bashecho "Install puppet client start"yum -y install rubymkdir -p /home/oldboy/tools/cd /home/oldboy/tools/unzip puppet.zipcd /home/oldboy/tools/puppet#wget http://projects.puppetlabs.com/attachments/download/1101/facter-1.5.8.tar.gz#wget http://projects.puppetlabs.com/attachments/download/1114/puppet-2.6.1.tar.gztar xf facter-1.5.

 自动化shell脚本批量优化操作系统

摘要:#!/bin/bash#set envexport PATH=$PATH:/bin/:/sbin/:/usr/sbinexport LANG="zh_CN.GB18030" #Require root to run this script.if [[ "$(whoami)" != "root" ]];then        echo"Please run this script as root." >&2        exit 1fi #d

 服务器最小化安装后的优化脚本

摘要:#!/bin/bash echo "#add 163  epel /usr/bin/yum "ver=`cat /etc/redhat-release  |awk '{print $3}'| awk -F "." '{print $1}'`if [ $ver -eq 5 ]; then                /bin/rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/5/i386/epel-release-5-4.noarch.rpm&nb
分页:« 1 2 3 4 5 6 7 8 9 10 »
Powered by AKCMS