当前位置:网站首页>Modify the conf file through sed
Modify the conf file through sed
2022-07-28 07:33:00 【Exclusive rainy days】
such as , We need to change postgresql Medium postgresql.conf In the document password_encryption The attribute is md5.
$ grep password postgresql.conf
#password_encryption = scram-sha-256 # scram-sha-256 or md5
It can be as follows sed Order to modify
sed -i -E 's/^#?(password_encryption = )\S+(\s+#.*)/\1md5\2/' /tmp/postgresql.conf
among -E Indicates that regular expressions are enabled
#?Indicates that the configuration may be notes diaol(password_encryption = )Indicates that you need to match key value\S+Indicates that the replacement is not empty value value(\s+#.*)Indicates the reserved subsequent annotation content
边栏推荐
- Cdn.jsdelivr.net is not available, what should I do
- 项目经历总结
- DNA修饰金属铑Rh纳米颗粒RhNPS-DNA(DNA修饰贵金属纳米颗粒)
- Rsync+inotify to realize remote real-time synchronization
- EMC设计攻略 —时钟
- Soft exam certificate can be used like this! Get a certificate = get a professional title?
- Overview of distributed system development
- 调整数组顺序使奇数位于偶数前面——每日两题
- 移动端H5输入框调起手机软键盘,导致底部固定定位被顶起解决方法
- 教程篇(7.0) 06. 零信任网络访问ZTNA * FortiClient EMS * Fortinet 网络安全专家 NSE 5
猜你喜欢
随机推荐
Continous Gesture Recognition with hand-orented spatiotemporal feature
Learning to estimate 3D hand pose from single RGB image & amp notes
JS upload file method
如何理解CMS回收器降低gc停顿时间
Use of C3d
Why is ESD protection so important for integrated circuits? How to protect?
【解决方案】可视化全链路日志追踪-日志追踪系统
指针进阶练习
华为交换机拆解,学EMC基本操作
Image segmentation method
学生执勤问题
User mode vs kernel mode, process vs thread
caffe fine tune
Reasons why null is not recommended for MySQL fields
Basic usage and precautions of arrow function (= >) and three-point operator (...) in ES6 (this points to)
Shortest seek time first (SSTF)
EMC设计攻略 —时钟
ThreadLocal那些事
Redis的RDB持久化和AOF持久化的底层原理
PyTorch - Dropout: A Simple Way to Prevent Neural Networks from Overfitting









