当前位置:网站首页>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

边栏推荐
- SuperMap支持的国产环境汇总
- 【MySQL series】- Does LIKE query start with % will make the index invalid?
- Fragment visibility judgment
- Residential water problems
- sql语句多字段多个值如何进行排序
- Greenplum Database Fault Analysis - Can a Soft Connection Be Made to the Database Base Folder?
- Jincang database KingbaseES V8 GIS data migration solution (3. Data migration based on ArcGIS platform to KES)
- C student management system head to add a student node
- ARM Mailbox
- MySQL3
猜你喜欢
![[Word] #() error occurs after Word formula is exported to PDF](/img/6a/168ded19d22826b6af974907f480fb.png)
[Word] #() error occurs after Word formula is exported to PDF

How do programmers without objects spend the Chinese Valentine's Day

基于OpenVINO工具套件简单实现YOLOv7预训练模型的部署

Matlab map with color representation module value size arrow

ExcelPatternTool: Excel table-database mutual import tool

02 【开发服务器 资源模块】

释放技术创新引擎,英特尔携手生态合作伙伴推动智慧零售蓬勃发展

从零到一快速学会三子棋

Live preview | 30 minutes started quickly!Look at credible distributed AI chain oar architectural design

CPDA|运营人如何从负基础学会数据分析(SQL)
随机推荐
Common hardware delays
多线程(2)
用@Mapper查询oracle的分区情况报错
优化Feed流遭遇拦路虎,是谁帮百度打破了“内存墙”?
开篇-开启全新的.NET现代应用开发体验
fragment可见性判断
02 【开发服务器 资源模块】
Quickly learn chess from zero to one
【MySQL series】- Does LIKE query start with % will make the index invalid?
.Net C# Console Create a window using Win32 API
The difference between a process in user mode and kernel mode [exclusive analysis]
SuperMap支持的国产环境汇总
【OpenCV 图像处理2】:OpenCV 基础知识
iNFTnews | What can NFTs bring to the sports industry and fans?
关于#sql shell#的问题,如何解决?
领域驱动设计——MDD
1349. Maximum number of students taking the exam Status Compression
How do programmers without objects spend the Chinese Valentine's Day
Tree search (bintree)
后期学习计划