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

边栏推荐
- Pisanix v0.2.0 released | Added support for dynamic read-write separation
- 使用SuperMap iDesktopX数据迁移工具迁移地图文档和符号
- iNFTnews | 对体育行业和球迷来说,NFT可以带来什么?
- 【解密】OpenSea免费创造的NFT都没上链竟能出现在我的钱包里?
- 亚马逊云科技携手中科创达为行业客户构建AIoT平台
- Understand the recommendation system in one article: Recall 06: Two-tower model - model structure, training method, the recall model is a late fusion feature, and the sorting model is an early fusion
- The 2022 EdgeX China Challenge will be grandly opened on August 3
- Access Characteristics of Constructor under Inheritance Relationship
- std::string::find 返回值的坑
- Oracle encapsulates restful interfaces into views
猜你喜欢

hypervisor相关的知识点

高数_复习_第1章:函数、极限、连续

LPQ (local phase quantization) study notes

如何逐步执行数据风险评估

海量服务实例动态化管理

Xunrui cms website cannot be displayed normally after relocation and server change

Exploding the circle of friends, Alibaba produced billion-level concurrent design quick notes are too fragrant

DAY23: Command Execution & Code Execution Vulnerability

程序员失眠时的数羊列表 | 每日趣闻

Utilities
随机推荐
力扣-相同的树
【C语言】详解栈和队列(定义、销毁、数据的操作)
[ROS](10)ROS通信 —— 服务(Service)通信
优化Feed流遭遇拦路虎,是谁帮百度打破了“内存墙”?
Leetcode刷题——22. 括号生成
sql语句多字段多个值如何进行排序
RAID磁盘阵列
Pisanix v0.2.0 发布|新增动态读写分离支持
Pisanix v0.2.0 released | Added support for dynamic read-write separation
PHP Skills Assessment
【genius_platform软件平台开发】第七十六讲:vs预处理器定义的牛逼写法!!!!(其他组牛逼conding人员告知这么配置来取消宏定义)
Short domain name bypass and xss related knowledge
source program in assembly language
".NET IoT from scratch" series
1349. Maximum number of students taking the exam Status Compression
Quickly learn chess from zero to one
Matlab map with color representation module value size arrow
LeetCode uses the minimum cost to climb the stairs----dp problem
CPDA|运营人如何从负基础学会数据分析(SQL)
常见的硬件延迟