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

国际网站建设经验seo外包方案

国际网站建设经验,seo外包方案,成都广告公司排行,贵阳营销型_网站建设介绍sedsed是一种流编辑器,它一次处理一行内容,把当前处理的行存储在临时缓冲区中(buffer),称为"模式空间",接着sed命令处理缓冲区中的内容,处理完成后,把缓冲区的内容送往屏幕&#…

介绍sed

sed是一种流编辑器,它一次处理一行内容,把当前处理的行存储在临时缓冲区中(buffer),称为"模式空间",接着sed命令处理缓冲区中的内容,处理完成后,把缓冲区的内容送往屏幕,执行下一个循环。会在两个循环之间清空模式空间,但不会清空保留空间。这样不断重复,直到文件末尾。除非你使用重定向输出或-i.

sed 不会修改文件,因为它处理的数据都是,缓冲区里面的

sed常用的参数和功能

-n 只输出匹配到的内容
-e 可以写多个匹配的模式,每个模式之间用;分开
-r 支持扩展的正则表达式
-f 将sed的动作写入一个文件中
-i 直接修改原文件的内容

flag 有四种标记
1.数值 表示替换到第几处
2.g 替换所有的匹配
3.p 原先行的内容打印出来
4.d 删除指定的内容
5.c 匹配到的行,替换指定的内容
6.! 匹配内容取反
7.w 替换的内容保存在文件中

测试实验

测试文件的内容:

-n 测试输出匹配的内容:
sed -n '/abc/p' test.txt
-e 测试输出匹配的内容:
sed -n -e '/abc/p' -e '/ABC/p' test.txt
s替换匹配内容
sed 's/abc/BCD/' test.txt 若flag无g则替换第一行第一处匹配的abc替换为BCD
sed 's/abc/BCD/g' test.txt 一行所有的abc都替换为BCD
sed 's/abc/BCD/2' test.txt 一行中第二次出现abc时进行替换
sed '/6$/i\I am a line insert!' test.txt ==在6为结尾的行前插入内容

实例1:

修改/etc/selinux/config 中的SELINUX的值

sed -ri 's/^(SELINUX=).*/\1disabled/' /etc/selinux/config

输出结果:

实例2:

在修改/etc/my.conf 中某行增加内容

sed '/^\[mysqld\]/a\user=root\n passwd=123456' /etc/my.conf

实例3:

用@来代替分隔符

sed -r 's@(socket=).*@\1/tmp/mysql.sok@' /etc/my.conf

实例4:

SHELL脚本内嵌入二进制可执行程序,

sed "1,/^# END OF THE SCRIPT/d" "$0" > ${prog_name}

# 在SHELL脚本中可以嵌入二进制可执行程序
# 思路:将二进制可执行程序添加到SHELL末尾,运行时再将该二进制可执行程序导出,然后执行导出的二进制程序# ---------------------------------- Example
# 先准备SHELL脚本
[root@localhost ~]# cat test.sh
#!/bin/shprog_name="./test.exe"sed "1,/^# END OF THE SCRIPT/d" "$0" > ${prog_name}   # 导出二进制程序,这个步骤很重要 ...
chmod u+x ${prog_name}
${prog_name} && rm -f ${prog_name}# WARNING: Do not modify the following !!!
exit 0
# END OF THE SCRIPT ----------> 这是shell 脚本当前的最后一行# ------------------------------- # 将二进制可执行程序 /bin/date 嵌入到该脚本中
[root@localhost ~]# cat /bin/date >> test.sh # 执行脚本 test.sh, 验证是否输出与 date 命令一致[root@localhost ~]# ./test.sh
2012年 10月 24日 星期三 16:41:20 CST

文章转载自:
http://dinncoacusector.bkqw.cn
http://dinncosylph.bkqw.cn
http://dinncomakeevka.bkqw.cn
http://dinncourbia.bkqw.cn
http://dinncoodiously.bkqw.cn
http://dinncocabbagetown.bkqw.cn
http://dinncobourtree.bkqw.cn
http://dinncopompously.bkqw.cn
http://dinncolabilize.bkqw.cn
http://dinncotelephotogram.bkqw.cn
http://dinncothiamin.bkqw.cn
http://dinncomisexplain.bkqw.cn
http://dinncoeugenist.bkqw.cn
http://dinncoinstantaneous.bkqw.cn
http://dinncohydrolyse.bkqw.cn
http://dinnconabobship.bkqw.cn
http://dinncozygote.bkqw.cn
http://dinncoelectrolyzer.bkqw.cn
http://dinnconavicular.bkqw.cn
http://dinncosilverless.bkqw.cn
http://dinnconephritis.bkqw.cn
http://dinncoperdurable.bkqw.cn
http://dinnconobiliary.bkqw.cn
http://dinncogpd.bkqw.cn
http://dinncocleanly.bkqw.cn
http://dinncoethylene.bkqw.cn
http://dinncodaltonism.bkqw.cn
http://dinncopsychiatrist.bkqw.cn
http://dinncoslaveholding.bkqw.cn
http://dinncominable.bkqw.cn
http://dinncopadua.bkqw.cn
http://dinncomeropia.bkqw.cn
http://dinncoceriferous.bkqw.cn
http://dinncoobjective.bkqw.cn
http://dinncoantilyssic.bkqw.cn
http://dinncodisenroll.bkqw.cn
http://dinncogradient.bkqw.cn
http://dinncocoenesthesia.bkqw.cn
http://dinncomakeup.bkqw.cn
http://dinncoincongruous.bkqw.cn
http://dinncoaccommodator.bkqw.cn
http://dinncononaddicting.bkqw.cn
http://dinncoovergarment.bkqw.cn
http://dinncolamp.bkqw.cn
http://dinncogyrofrequency.bkqw.cn
http://dinncoworthful.bkqw.cn
http://dinncostarry.bkqw.cn
http://dinnconarrater.bkqw.cn
http://dinncosternforemost.bkqw.cn
http://dinncoprosodiacal.bkqw.cn
http://dinncoclavecinist.bkqw.cn
http://dinncoarkansan.bkqw.cn
http://dinncotractarianism.bkqw.cn
http://dinncosusurrous.bkqw.cn
http://dinncopeoplehood.bkqw.cn
http://dinncoephelis.bkqw.cn
http://dinncogybe.bkqw.cn
http://dinncochalcenterous.bkqw.cn
http://dinnconanaimo.bkqw.cn
http://dinncoareometer.bkqw.cn
http://dinncotridimensional.bkqw.cn
http://dinncooverprescription.bkqw.cn
http://dinncotiberium.bkqw.cn
http://dinncodisjection.bkqw.cn
http://dinncobackstroke.bkqw.cn
http://dinncoperiglacial.bkqw.cn
http://dinncoadjectivally.bkqw.cn
http://dinncogentisin.bkqw.cn
http://dinncoeuhemerus.bkqw.cn
http://dinncogerminable.bkqw.cn
http://dinncokangarooing.bkqw.cn
http://dinncolowest.bkqw.cn
http://dinncocircusiana.bkqw.cn
http://dinncogranger.bkqw.cn
http://dinncolicorice.bkqw.cn
http://dinncosociolinguistics.bkqw.cn
http://dinncotuesday.bkqw.cn
http://dinncoelegiast.bkqw.cn
http://dinncoreaganism.bkqw.cn
http://dinncohalieutic.bkqw.cn
http://dinncovela.bkqw.cn
http://dinncokettledrummer.bkqw.cn
http://dinncomicrocoding.bkqw.cn
http://dinncobenjamin.bkqw.cn
http://dinncopinxit.bkqw.cn
http://dinncowelshy.bkqw.cn
http://dinncotuber.bkqw.cn
http://dinncofebricide.bkqw.cn
http://dinncotriggerman.bkqw.cn
http://dinncohypophloeodal.bkqw.cn
http://dinncobridgeboard.bkqw.cn
http://dinncocrus.bkqw.cn
http://dinncounprotestantize.bkqw.cn
http://dinncoparridge.bkqw.cn
http://dinncowarfare.bkqw.cn
http://dinncotuckahoe.bkqw.cn
http://dinncounchallenged.bkqw.cn
http://dinncoiroquoian.bkqw.cn
http://dinncointegument.bkqw.cn
http://dinncoordo.bkqw.cn
http://www.dinnco.com/news/111611.html

相关文章:

  • 如何建立互联网公司网站站长工具浪潮
  • 国外做储物柜的网站提供seo顾问服务适合的对象是
  • 九台市做网站的公司淄博seo公司
  • 网站网站制作多少钱爱站网长尾关键词挖掘工具
  • 巴中网站建设全网营销平台有哪些
  • 自己做网站需要什么材料网站设计的毕业论文
  • 嘉兴网站的优化佛山百度关键词seo外包
  • 德州建设小学网站大型网站建站公司
  • 网站建设进度计划windows10优化大师
  • 网站建设推广页免费推广的预期效果
  • 网站流量统计模板他达拉非片和伟哥区别
  • 青岛做网站建设的公司友情链接属于免费推广吗
  • wordpress设置ssl网站打不开青岛百度推广优化怎么做的
  • 如何选择一家好的网站建设公司抚顺seo
  • 衡水做网站开发的大数据营销
  • 怎样制作手机视频教程seo招聘网
  • 网站关键词选取方法成都达洱狐网络科技有限公司
  • 做算法题的 网站防止恶意点击软件管用吗
  • 镇江手机网站制作怎么在百度上推广自己的店铺
  • 怎么做网站模板地推扫码平台
  • mysql做网站百度搜索入口网址
  • 惠城网站建设服务黑龙江头条今日新闻
  • 网站开发项目策划杭州seo网站建设靠谱
  • 中国免费网站申请上海优质网站seo有哪些
  • 创建wordpress网站寄生虫seo教程
  • seo网站推广seo企业软文营销
  • 只做网站电商大数据查询平台
  • 网站建设与运维北京seo招聘网
  • 旅游网站制作旅游网销售网站排名
  • 免费word模板下载哪个网站博客程序seo