当前位置:网站首页>shell语句修改txt文件或者sh文件
shell语句修改txt文件或者sh文件
2022-08-05 02:22:00 【fK0pS】
shell语句修改txt文件或者sh文件
基本思路,使用正则表达式,找到目标,替换目标,保存文件
shell sed regular expression
regular expression
方案1:
runScSparkFilename="runScSpark.sh" sed -i "s/$search/$replace/" $filename
方案2:
$ cat /etc/syslog.conf | sed -n '/^[[:alpha:]]/p' authpriv.* /var/log/secure
边栏推荐
- LeetCode uses the minimum cost to climb the stairs----dp problem
- 1349. Maximum number of students taking the exam Status Compression
- HOG feature study notes
- 开篇-开启全新的.NET现代应用开发体验
- The difference between a process in user mode and kernel mode [exclusive analysis]
- [Endnote] Word inserts a custom form of Endnote document format
- [ROS](10)ROS通信 —— 服务(Service)通信
- Amazon Cloud Technology joins hands with Thundersoft to build an AIoT platform for industry customers
- 重新审视分布式系统:永远不会有完美的一致性方案……
- Access Characteristics of Constructor under Inheritance Relationship
猜你喜欢
Leetcode刷题——22. 括号生成
编译预处理等细节
02 [Development Server Resource Module]
树形查找(二叉查找树)
C语言日记 9 if的3种语句
直播预告|30分钟快速入门!来看可信分布式AI链桨的架构设计
Simple implementation of YOLOv7 pre-training model deployment based on OpenVINO toolkit
Opening - Open a new .NET modern application development experience
LPQ(局部相位量化)学习笔记
Using OpenVINO to implement the flying paddle version of the PGNet inference program
随机推荐
Apache DolphinScheduler新一代分布式工作流任务调度平台实战-中
使用OpenVINO实现飞桨版PGNet推理程序
领域驱动设计——MDD
[Word] #() error occurs after Word formula is exported to PDF
多线程(2)
Pisanix v0.2.0 发布|新增动态读写分离支持
C学生管理系统 指定位置插入学生节点
C language basics -- pointers
SuperMap iDesktop.Net之布尔运算求交——修复含拓扑错误复杂模型
从零到一快速学会三子棋
线性表的查找
[ROS](10)ROS通信 —— 服务(Service)通信
Live playback including PPT download | Build Online Deep Learning based on Flink & DeepRec
ARM Mailbox
释放技术创新引擎,英特尔携手生态合作伙伴推动智慧零售蓬勃发展
后期学习计划
Quickly learn chess from zero to one
Programmer's list of sheep counting when insomnia | Daily anecdote
iNFTnews | 对体育行业和球迷来说,NFT可以带来什么?
C学生管理系统 据学号查找学生节点