当前位置: 首页 > news >正文

像素人物制作网站做产品推广的网站有哪些

像素人物制作网站,做产品推广的网站有哪些,注册公司的步骤流程图,wordpress设置标题字体awk 命令 awk 是一种处理文本文件的语言#xff0c;是一个强大的文本分析工具。 awk 通过提供编程语言的功能#xff0c;如变量、数学运算、字符串处理等#xff0c;使得对文本文件的分析和操作变得非常灵活和高效。 之所以叫 awk 是因为其取了三位创始人 Alfred Aho#x… awk 命令 awk 是一种处理文本文件的语言是一个强大的文本分析工具。 awk 通过提供编程语言的功能如变量、数学运算、字符串处理等使得对文本文件的分析和操作变得非常灵活和高效。 之所以叫 awk 是因为其取了三位创始人 Alfred AhoPeter Weinberger, 和 Brian Kernighan 的 Family Name 的首字符。 这里我们有一个文本文件test.txt 1 2 3 4 5 6 test1 test2 test3 test4 There are some words there are some numbers打印整行 # awk {print} test.txtroothcss-ecs-c2b8:/var/test# awk {print} test.txt 1 2 3 4 5 6 test1 test2 test3 test4 There are some words there are some numbers打印特定列 # awk {print $1, $2} test.txt roothcss-ecs-c2b8:/var/test# awk {print $1, $2} test.txt 1 2 test1 test2 There are there are roothcss-ecs-c2b8:/var/test# awk {print $3, $4} test.txt 3 4 test3 test4 some words some numbers 使用分隔符指定列 # awk -F, {print $1, $2} test.txt 打印行数 # awk {print NR, $0} file roothcss-ecs-c2b8:/var/test# awk {print NR,$0} test.txt 1 1 2 3 4 5 6 2 test1 test2 test3 test4 3 There are some words 4 there are some numbers打印行数满足条件的行 awk /pattern/ {print NR, $0} file计算列的总和 # awk {sum $1} END {print sum} file # test.txt 1 2 3 4 5 2 3 4 5 6 test1 test2 test3 test4 There are some words there are some numbersroothcss-ecs-c2b8:/var/test# vim test.txt # 只会计算数字类型,不能转化为数字的不影响求和 roothcss-ecs-c2b8:/var/test# awk {sum $1} END {print sum} test.txt 21打印最大值 awk max $1 {max $1} END {print max} file格式化输出 awk {printf %-10s %-10s\n, $1, $2} filesed 命令 Linux sed 命令是利用脚本来处理文本文件。 sed 可依照脚本的指令来处理、编辑文本文件。 Sed 主要用来自动编辑一个或多个文件、简化对文件的反复操作、编写转换程序等。 语法 sed [-hnV][-escript][-fscript文件][文本文件]参数说明 -e 先创建一个sed的测试文本文件 roothcss-ecs-c2b8:/var/test# vim sed_test.txt roothcss-ecs-c2b8:/var/test# cat sed_test.txt HELLO LINUX! Linux is a free unix-type opterating system. This is a linux testfile! Linux test Google Taobao Runoob Tesetfile Wiki添加文本 # 现在我们在第3行后添加一行文本Newline roothcss-ecs-c2b8:/var/test# sed 3a\NewLine sed_test.txt HELLO LINUX! Linux is a free unix-type opterating system. This is a linux testfile! NewLine Linux test Google Taobao Runoob Tesetfile Wiki # cat查看发现他并不会去修改原文件 roothcss-ecs-c2b8:/var/test# cat sed_test.txt HELLO LINUX! Linux is a free unix-type opterating system. This is a linux testfile! Linux test Google Taobao Runoob Tesetfile Wiki # 我们去第三行前添加文本 roothcss-ecs-c2b8:/var/test# sed 3i\NewLine sed_test.txt HELLO LINUX! Linux is a free unix-type opterating system. NewLine This is a linux testfile! Linux test Google Taobao Runoob Tesetfile Wiki删除指定行数的文本 roothcss-ecs-c2b8:/var/test# nl sed_test.txt 1 HELLO LINUX! 2 Linux is a free unix-type opterating system. 3 This is a linux testfile! 4 Linux test 5 Google6 Taobao7 Runoob8 Tesetfile9 Wikiroothcss-ecs-c2b8:/var/test# nl sed_test.txt | sed 2d1 HELLO LINUX! 3 This is a linux testfile! 4 Linux test 5 Google6 Taobao7 Runoob8 Tesetfile9 Wikiroothcss-ecs-c2b8:/var/test# nl sed_test.txt | sed 2,6d1 HELLO LINUX! 7 Runoob8 Tesetfile9 Wikiroothcss-ecs-c2b8:/var/test# nl sed_test.txt | sed 6d1 HELLO LINUX! 2 Linux is a free unix-type opterating system. 3 This is a linux testfile! 4 Linux test 5 Google7 Runoob8 Tesetfile9 Wiki 替换文本 roothcss-ecs-c2b8:/var/test# cat sed_test.txt #原文本 HELLO LINUX! Linux is a free unix-type opterating system. This is a linux testfile! Linux test Google Taobao Runoob Tesetfile Wiki # 替换后的文本 roothcss-ecs-c2b8:/var/test# sed -e s/LINUX/UNIX/g sed_test.txt HELLO UNIX! Linux is a free unix-type opterating system. This is a linux testfile! Linux test Google Taobao Runoob Tesetfile Wikiroothcss-ecs-c2b8:/var/test# sed -e s/Taobao/JD/g sed_test.txt HELLO LINUX! Linux is a free unix-type opterating system. This is a linux testfile! Linux test Google JD Runoob Tesetfile Wiki思考: grep 更适合单纯的查找或匹配文本sed 更适合编辑匹配到的文本awk 更适合格式化文本对文本进行较复杂格式处理 简单编写一个shell脚本使用这两个命令 # alarm_handler.sh #!/bin/bash# 监控系统资源使用情况 threshold$1 # 设置CPU使用率的阈值为threshold%。 cpu_usage$(top -bn1 | grep Cpu(s) | sed s/.*, *\([0-9.]*\)%* id.*/\1/ | awk {print 100 - $1}) # 第二题中出现。grep、sed 和 awk 结合从输出中提取并计算CPU空闲百分比。# 使用 bc 计算判断CPU使用率是否超过阈值。 if [[ $(echo $cpu_usage $threshold | bc -l) -eq 1 ]]; thenecho High CPU usage detected: $cpu_usage%# 如果CPU使用率超过阈值使用 mail 命令发送邮件给 adminexample.com。echo High CPU Usage warning,Current CPU Usage: $cpu_usage% elseecho CPU usage within normal range: $cpu_usage% firoothcss-ecs-c2b8:/var/test# vim alarm_handler.sh roothcss-ecs-c2b8:/var/test# chmod x alarm_handler.sh roothcss-ecs-c2b8:/var/test# ./alarm_handler.sh 20 CPU usage within normal range: 0% roothcss-ecs-c2b8:/var/test# ./alarm_handler.sh 30 CPU usage within normal range: 3.2%没跑任何服务的原因,cpu几乎没有任何占用
http://www.hkea.cn/news/14284533/

相关文章:

  • 单位网址怎么编seo外包公司一般费用是多少
  • 以net结尾的网站手机网页怎么做出来的
  • 德骏网站建设php律师网站源码
  • 建设银行网站怎么查工资明细多导航织梦网站模板下载地址
  • 电子商务如何设计网站建设湖南省建设干部学校 网站
  • 网站常用颜色wordpress搜索即时显示
  • 怎么做网站计划跨境电商网站搭建
  • 做网站备案是什么意思企业在公司做的网站看不到
  • 可以提升自己的网站广州网站制作多少钱
  • 台州找人做网站网站上传空间下一步
  • 做海报可以借鉴的网站微网站模板前后台
  • 网站开发w亿玛酷1负责wordpress admin
  • 专做PPP项目网站西安百度快照优化
  • 广告网站做动图怎么做购物网站难做
  • 做汤的网站专业企业app开发制作
  • 南阳seo网站价格顺德网站制作案例信息
  • 珠海找工作哪个网站好怎么找到仿牌外贸出口公司的网站
  • 网站建设用什么框架好wordpress建站阿里云
  • 大型网站建设方案常见问题延吉做网站
  • 我要发布文章到网站上推广 哪些网站最好教育 wordpress模板下载
  • 深圳市哪些公司做网站好行政审批服务中心
  • 机票旅游网站建设下载赶集网招聘最新招聘
  • 济南网站建设推荐q479185700强涵wordpress xmlrpc漏洞
  • 昆明网站制作公司网站制作流程分为哪七步
  • 太原seo快速排名怎么样泉州seo管理
  • 有什么平台可以做网站云商城
  • 优酷专门给马天宇做的网站怎样在手机安装wordpress
  • 站优云seo优化开发助手app下载
  • 一 网站建设管理基本情况目前网站开发怎么兼顾手机
  • wordpress会员制网站wordpress网站主修改