当前位置:网站首页>shell statement to modify txt file or sh file
shell statement to modify txt file or sh file
2022-08-05 02:30:00 【fK0pS】
The shell statement modifies the txt file or the sh file
Basic ideas, use regular expressions, find the target, replace the target, save the file
shell sed regular expression
regular expression
Option 1:
runScSparkFilename="runScSpark.sh"sed -i "s/$search/$replace/" $filename
Option 2:
$ cat /etc/syslog.conf | sed -n '/^[[:alpha:]]/p'authpriv.* /var/log/secure
边栏推荐
- Matlab map with color representation module value size arrow
- 亚马逊云科技携手中科创达为行业客户构建AIoT平台
- dotnet 6 为什么网络请求不跟随系统网络代理变化而动态切换代理
- LPQ (local phase quantization) study notes
- Chapter 09 Use of Performance Analysis Tools [2. Index and Tuning] [MySQL Advanced]
- [深入研究4G/5G/6G专题-51]: URLLC-16-《3GPP URLLC相关协议、规范、技术原理深度解读》-11-高可靠性技术-2-链路自适应增强(根据无线链路状态动态选择高可靠性MCS)
- Jincang database KingbaseES V8 GIS data migration solution (3. Data migration based on ArcGIS platform to KES)
- 领域驱动设计——MDD
- C语言日记 9 if的3种语句
- 常见的硬件延迟
猜你喜欢
Tree search (bintree)
使用SuperMap iDesktopX数据迁移工具迁移ArcGIS数据
Hypervisor related knowledge points
特殊矩阵的压缩存储
.Net C# 控制台 使用 Win32 API 创建一个窗口
【MySQL series】- Does LIKE query start with % will make the index invalid?
SuperMap iDesktop.Net之布尔运算求交——修复含拓扑错误复杂模型
浅谈数据安全治理与隐私计算
线性表的查找
Advanced Numbers_Review_Chapter 1: Functions, Limits, Continuity
随机推荐
Short domain name bypass and xss related knowledge
HOG feature study notes
散列表的查找(哈希表)
Semi-Decentralized Federated Learning for Cooperative D2D Local Model Aggregation
leetcode 15
力扣-二叉树的最大的深度
正则表达式,匹配中间的某一段字符串
海量服务实例动态化管理
如何模拟后台API调用场景,很细!
02 【开发服务器 资源模块】
力扣-相同的树
Greenplum数据库故障分析——能对数据库base文件夹进行软连接嘛?
【MySQL系列】- LIKE查询 以%开头一定会让索引失效吗
Using OpenVINO to implement the flying paddle version of the PGNet inference program
浅谈数据安全治理与隐私计算
SuperMap支持的国产环境汇总
【C语言】详解栈和队列(定义、销毁、数据的操作)
leetcode-另一棵树的子树
继承关系下构造方法的访问特点
How to create an rpm package