当前位置:网站首页>Crudini profile editing tool
Crudini profile editing tool
2022-07-07 06:19:00 【Hua Weiyun】
Crudini yes Pádraig Brady use Python Developed 、 Used to correct ini Tools for editing configuration files .
crud yes 4 Acronyms of words , namely create、read、update and delete, Chinese translated into “ Additions and deletions ”. This is the most common form of data 4 Class operation method .
install
# centosyum install -y crudini
Grammar format
crudini --set [OPTION]... config_file section [param] [value] crudini --get [OPTION]... config_file [section] [param] crudini --del [OPTION]... config_file section [param] [list value] crudini --merge [OPTION]... config_file [section]
Common parameters :
--get | Get the section or key value in the configuration file |
--set | set key value |
--merge | Merge profile |
--format=FMT | by --get Use , Select the output format . The format is sh,ini,lines |
--inplace | Lock and write file , There are fewer restrictions than the default replacement |
--list | by --set and --del, Update a list ( aggregate ) Value |
--list-sep=STR | Use custom characters instead of the default comma |
--output=FILE | Write output to file .’-“ Indicates standard output ” |
--verbose | Indicate on the error output whether changes have been made |
Example
Get a key value
# obtain nova.conf The configuration file TEST section abc Value of key crudini --get nova.conf TEST abc
Get a value that is not in the section
crudini --get nova.conf '' abc
Get the key of a section
crudini --get nova.conf DEFAULT
Add or update a value that is not in the section
crudini --get nova.conf '' abc 456
Add or update a key value
# Set up cinder.conf file DEFAULT section auth_strategy Key value is keystonecrudini --set /etc/cinder/cinder.conf DEFAULT auth_strategy keystone
Update an existing key value ( If the variable does not exist, it will return “Parameter not found:”):
crudini --set --existing /etc/cinder/cinder.conf DEFAULT auth_strategy keystone
Delete a key
# Delete nova.conf The configuration file DEFAULT section abc key crudini --del nova.conf DEFAULT abc
Delete a section
# Delete nova.conf The configuration file TEST section crudini --del nova.conf TEST
Merge profile
# take test1.ini Merge into test.inicrudini --merge test.ini < test1.ini
# The output can be determined by shell Parsed section eval $(crudini --get --format=sh config_file section)# from shell Variable update ini file echo name="$name" | crudini --merge config_file section# Use standards UNIX Text processing compares two ini file diff <(crudini --get --format=lines file1.ini|sort) \ <(crudini --get --format=lines file2.ini|sort)
边栏推荐
- k8s运行oracle
- 测试开发基础,教你做一个完整功能的Web平台之环境准备
- vim映射大K
- 职场经历反馈给初入职场的程序员
- Rk3399 platform development series explanation (interruption) 13.10, workqueue work queue
- Developers don't miss it! Oar hacker marathon phase III chain oar track registration opens
- JVM命令之 jstat:查看JVM统计信息
- Value range of various datetimes in SQL Server 2008
- Software testing knowledge reserve: how much do you know about the basic knowledge of "login security"?
- Several key steps of software testing, you need to know
猜你喜欢
JVM命令之- jmap:导出内存映像文件&内存使用情况
How to set up in touch designer 2022 to solve the problem that leap motion is not recognized?
Three updates to build applications for different types of devices | 2022 i/o key review
win系统下安装redis以及windows扩展方法
Introduction to the extension implementation of SAP Spartacus checkout process
A freshman's summary of an ordinary student [I don't know whether we are stupid or crazy, but I know to run forward all the way]
[SOC FPGA] peripheral PIO button lights up
安装VMmare时候提示hyper-v / device defender 侧通道安全性
3428. Put apples
10W word segmentation searches per second, the product manager raised another demand!!! (Collection)
随机推荐
C note 13
安装VMmare时候提示hyper-v / device defender 侧通道安全性
软件测试知识储备:关于「登录安全」的基础知识,你了解多少?
Jstat pour la commande JVM: voir les statistiques JVM
cf:C. Column Swapping【排序 + 模擬】
On the discrimination of "fake death" state of STC single chip microcomputer
Calculation model FPS
Peripheral driver library development notes 43: GPIO simulation SPI driver
C语言整理(待更新)
云加速,帮助您有效解决攻击问题!
JVM command - jmap: export memory image file & memory usage
Jinfo of JVM command: view and modify JVM configuration parameters in real time
如何在Touch Designer 2022版中设置解决Leap Motion不识别的问题?
go-microservice-simple(2) go-Probuffer
JVM命令之 jstat:查看JVM统计信息
外设驱动库开发笔记43:GPIO模拟SPI驱动
计算模型 FPS
Developers don't miss it! Oar hacker marathon phase III chain oar track registration opens
postgresql 数据库 timescaledb 函数time_bucket_gapfill()报错解决及更换 license
那些自损八百的甲方要求