当前位置:网站首页>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)
边栏推荐
- C note 13
- QT console output in GUI applications- Console output in a Qt GUI app?
- uniapp开发小程序如何使用微信云托管或云函数进行云开发
- Check point: the core element for enterprises to deploy zero trust network (ztna)
- Redis(一)——初识Redis
- Cf:c. column swapping [sort + simulate]
- Say sqlyog deceived me!
- FlexRay通信协议概述
- laravel 使用腾讯云 COS5全教程
- 测试开发基础,教你做一个完整功能的Web平台之环境准备
猜你喜欢
tkinter窗口选择pcd文件并显示点云(open3d)
Cf:c. column swapping [sort + simulate]
win系统下安装redis以及windows扩展方法
Sequential storage of stacks
From "running distractor" to data platform, Master Lu started the road of evolution
postgresql 数据库 timescaledb 函数time_bucket_gapfill()报错解决及更换 license
JVM命令之 jstat:查看JVM統計信息
"Parse" focalloss to solve the problem of data imbalance
Software testing knowledge reserve: how much do you know about the basic knowledge of "login security"?
Apple CMS V10 template /mxone Pro adaptive film and television website template
随机推荐
Jinfo of JVM command: view and modify JVM configuration parameters in real time
进程间通信之共享内存
2022Android面试必备知识点,一文全面总结
693. 行程排序
LM小型可编程控制器软件(基于CoDeSys)笔记二十三:伺服电机运行(步进电机)相对坐标转换为绝对坐标
当我们谈论不可变基础设施时,我们在谈论什么
POI excel export, one of my template methods
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]
360织语发布7.0新品 为党政军、央国企打造专属“统一数字工作空间”
jvm命令之 jcmd:多功能命令行
uniapp开发小程序如何使用微信云托管或云函数进行云开发
一名普通学生的大一总结【不知我等是愚是狂,唯知一路向前奔驰】
ML's shap: Based on the adult census income binary prediction data set (whether the predicted annual income exceeds 50K), use the shap decision diagram combined with the lightgbm model to realize the
Database notes 04
[SOC FPGA] peripheral PIO button lights up
Experience sharing of contribution of "management world"
@pathvariable 和 @Requestparam的详细区别
Jstack of JVM command: print thread snapshots in JVM
雷特智能家居龙海祁:从专业调光到全宅智能,20年专注成就专业
从“跑分神器”到数据平台,鲁大师开启演进之路