当前位置:网站首页>sed 技巧
sed 技巧
2022-06-21 23:52:00 【winux】
只替换符合上下文环境的pattern, 比如:如果c后面紧跟的不是字母A,就将c换成b
echo "c.cAcf" | sed 's/c/([^A]/)/b/1/g'
输出 b.cAbf
在符合规则的行前面,插入一个特定字符
echo "abcef" | sed '/ab/ s/^/#/'
其中/ab/是正则表达式,用来匹配某一行,
s/^/#/ 命令是替换, ^表示行首
边栏推荐
- Ns32f103vbt6 hardware and software replace stm32f103vbt6
- 【Try to Hack】nmap
- pytorch学习13:实现LetNet和学习nn.Module相关基本操作
- Introduction and use of pytest fixture, confitest and mark
- 数字化转型的下一个目标:提供准时制信息
- Tom Ellison, the new CFO of mendix, promoted the next stage of rapid growth of the company through the transformation of the leadership team
- How to judge pure IP? Where can I find it? Is it Expensive?
- Web应用系统开发的两种流行架构
- Document. How to use and listen for readyState
- Summary of new MySQL 8.0 features
猜你喜欢

鸿蒙OS学习(轮播图、列表、图标)

Error in jsonobject getting date type (getsqldate)

版本动态 | Exchangis 1.0.0-RC1 版本发布
![[examination skills] memory method and simple derivation of Green formula](/img/26/f28a9f4abaca94988845b3fdaaf571.png)
[examination skills] memory method and simple derivation of Green formula

企业可通过4个方法提高数据库安全

一文读懂LiveData 粘性事件

Win10使用用户初始密码,连接Win Server失败

数字化转型的下一个目标:提供准时制信息

Go技术日报(2022-06-20)——Go:简单的优化笔记

The importance of rational selection of seal clearance of hydraulic slip ring
随机推荐
在徽商期货开户做期货安全吗?
Tcp/ip-- routing
QT self made MP3 player
SQL语句——权限管理
Rotating frame target detection -- about the definition and solution of rotating frame
怎么读一篇论文
Meetup03期回顾:Linkis新版本介绍以及DSS的应用实践
VScode 中查看本地ip地址
关于相机位姿的可视化
前加后加探索和函数调用探索
力扣每日一题-第24天-485.最大连续1的个数
Eslint: error
面试官竟然问我订单ID是怎么生成的?难道不是MySQL自增主键?
Tom Ellison, the new CFO of mendix, promoted the next stage of rapid growth of the company through the transformation of the leadership team
Lecture 3 of Data Engineering Series: characteristic engineering of data centric AI
SQL语句——数据更新、修改、删除
滴滴工程效能平台建设之路
ARM 的 缓存一致性
积分体系运营汇中,用户的哪些行为可以获得积分
存储api备忘录