forked from pixelb/crudini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEXAMPLES
35 lines (24 loc) · 944 Bytes
/
EXAMPLES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Examples:
# Add/Update a var
crudini --set config_file section parameter value
# Update an existing var
crudini --set --existing config_file section parameter value
# Delete a var
crudini --del config_file section parameter
# Delete a section
crudini --del config_file section
# output a value
crudini --get config_file section parameter
# output a global value not in a section
crudini --get config_file '' parameter
# output a section
crudini --get config_file section
# output a section, parseable by shell
eval $(crudini --get --format=sh config_file section)
# update an ini file from shell variable(s)
echo name="$name" | crudini --merge config_file section
# merge an ini file from another ini
crudini --merge config_file < another.ini
# compare two ini files using standard UNIX text processing
diff <(crudini --get --format=lines file1.ini|sort) \
<(crudini --get --format=lines file2.ini|sort)