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

边栏推荐
- 蚁剑高级模块开发
- Residential water problems
- Live playback including PPT download | Build Online Deep Learning based on Flink & DeepRec
- 【LeetCode刷题】-数之和专题(待补充更多题目)
- DAY23: Command Execution & Code Execution Vulnerability
- 线性表的查找
- 开篇-开启全新的.NET现代应用开发体验
- The 2022 EdgeX China Challenge will be grandly opened on August 3
- .Net C# Console Create a window using Win32 API
- How to simply implement the quantization and compression of the model based on the OpenVINO POT tool
猜你喜欢

HOG特征学习笔记

关于#sql shell#的问题,如何解决?

2022了你还不会『低代码』?数据科学也能玩转Low-Code啦!

【MySQL series】- Does LIKE query start with % will make the index invalid?

浅谈数据安全治理与隐私计算

DAY22:sqli-labs 靶场通关wp(Less01~~Less20)

iNFTnews | 对体育行业和球迷来说,NFT可以带来什么?

【解密】OpenSea免费创造的NFT都没上链竟能出现在我的钱包里?

Leetcode brushing questions - 22. Bracket generation

学习笔记-----左偏树
随机推荐
Using OpenVINO to implement the flying paddle version of the PGNet inference program
释放技术创新引擎,英特尔携手生态合作伙伴推动智慧零售蓬勃发展
RAID disk array
RAID磁盘阵列
编译预处理等细节
DAY23:命令执行&代码执行漏洞
线性表的查找
HOG feature study notes
C student management system head to add a student node
Quickly learn chess from zero to one
Dotnet 6 Why does the network request not follow the change of the system network proxy and dynamically switch the proxy?
使用SuperMap iDesktopX数据迁移工具迁移ArcGIS数据
迁移学习——Distant Domain Transfer Learning
.Net C# 控制台 使用 Win32 API 创建一个窗口
Greenplum数据库故障分析——版本升级后gpstart -a为何返回失败
Simple implementation of YOLOv7 pre-training model deployment based on OpenVINO toolkit
力扣-相同的树
《.NET物联网从零开始》系列
【MySQL系列】- LIKE查询 以%开头一定会让索引失效吗
Amazon Cloud Technology joins hands with Thundersoft to build an AIoT platform for industry customers