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

边栏推荐
- 如何基于OpenVINO POT工具简单实现对模型的量化压缩
- Hypervisor related knowledge points
- 使用OpenVINO实现飞桨版PGNet推理程序
- [机缘参悟-60]:《兵者,诡道也》-2-孙子兵法解读
- 02 【开发服务器 资源模块】
- C语言日记 9 if的3种语句
- 【C语言】详解栈和队列(定义、销毁、数据的操作)
- Greenplum Database Fault Analysis - Can a Soft Connection Be Made to the Database Base Folder?
- dotnet 6 为什么网络请求不跟随系统网络代理变化而动态切换代理
- C student management system Insert the student node at the specified location
猜你喜欢

迁移学习——Joint Geometrical and Statistical Alignment for Visual Domain Adaptation

Optimizing the feed flow encountered obstacles, who helped Baidu break the "memory wall"?

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

【 2 】 OpenCV image processing: basic knowledge of OpenCV

C language implements a simple number guessing game

shell语句修改txt文件或者sh文件

sql语句多字段多个值如何进行排序

Advanced Numbers_Review_Chapter 1: Functions, Limits, Continuity

“嘀哩哩,等灯等灯”,工厂安全生产的提示音

【OpenCV 图像处理2】:OpenCV 基础知识
随机推荐
leetcode 15
DAY22: sqli-labs shooting range clearance wp (Less01~~Less20)
C student management system Find student nodes based on student ID
Access Characteristics of Constructor under Inheritance Relationship
Live playback including PPT download | Build Online Deep Learning based on Flink & DeepRec
Jincang database KingbaseES V8 GIS data migration solution (3. Data migration based on ArcGIS platform to KES)
Semi-Decentralized Federated Learning for Cooperative D2D Local Model Aggregation
the mechanism of ideology
C language basics -- pointers
STM32使用stm32cubemx LL库系列教程
散列表的查找(哈希表)
PHP Skills Assessment
【C语言】详解栈和队列(定义、销毁、数据的操作)
nodeJs--封装路由
【 2 】 OpenCV image processing: basic knowledge of OpenCV
【存储】曙光存储DS800-G35 ISCSI各映射LUN给服务器
".NET IoT from scratch" series
关于#sql shell#的问题,如何解决?
树表的查找
C语言日记 9 if的3种语句