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

边栏推荐
Utilities - 高数_复习_第1章:函数、极限、连续
- 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
- dotnet 6 为什么网络请求不跟随系统网络代理变化而动态切换代理
- 浅谈数据安全治理与隐私计算
- 正则表达式,匹配中间的某一段字符串
- C语言实现简单猜数字游戏
- LeetCode使用最小花费爬楼梯----dp问题
- 常见的硬件延迟
- 继承关系下构造方法的访问特点
猜你喜欢

Transfer Learning - Distant Domain Transfer Learning

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

The 2022 EdgeX China Challenge will be grandly opened on August 3

Leetcode brushing questions - 22. Bracket generation

常见的硬件延迟

Using OpenVINO to implement the flying paddle version of the PGNet inference program

DAY23:命令执行&代码执行漏洞

VSCode Change Default Terminal 如何修改vscode的默认terminal

【MySQL系列】- LIKE查询 以%开头一定会让索引失效吗

LPQ(局部相位量化)学习笔记
随机推荐
特殊矩阵的压缩存储
js中try...catch和finally的用法
matlab绘制用颜色表示模值大小的箭头图
编译预处理等细节
SuperMap支持的国产环境汇总
Greenplum数据库故障分析——版本升级后gpstart -a为何返回失败
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
【genius_platform软件平台开发】第七十六讲:vs预处理器定义的牛逼写法!!!!(其他组牛逼conding人员告知这么配置来取消宏定义)
RAID磁盘阵列
Apache DolphinScheduler新一代分布式工作流任务调度平台实战-中
"Configuration" is a double-edged sword, it will take you to understand various configuration methods
继承关系下构造方法的访问特点
树形查找(二叉查找树)
KingbaseES V8 GIS data migration solution (2. Introduction to the capabilities of Kingbase GIS)
Flink 1.15.1 集群搭建(StandaloneSession)
网络安全与元宇宙:找出薄弱环节
优化Feed流遭遇拦路虎,是谁帮百度打破了“内存墙”?
Transfer Learning - Distant Domain Transfer Learning
fragment可见性判断
关于#sql shell#的问题,如何解决?