You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ The global options `-i`/`--ignore-case` and `-p`/`--pass-through` must precede t
53
53
When given a valid command, initool first reads the INI file `filename` in its entirety.
54
54
If the filename is `-`, initool reads standard input. For the commands `get`, `set`, `replace`, and `delete`, it then prints to standard output the file's contents with the desired change.
55
55
For `exists`, it reports whether the section or the property exists through its exit status.
56
+
**Initool never modifies the original file.**
56
57
57
58
An INI file consists of properties (`key=value` lines) and sections (designated with a `[section name]` header line).
58
59
A property can be at the "top level" of the file (before any section headers) or in a section (after a section header).
@@ -131,6 +132,14 @@ initool delete settings.ini test | initool set - "" cache 1024 > settings.ini.ne
131
132
move /y settings.ini.new settings.ini
132
133
```
133
134
135
+
You can use pipelines in PowerShell.
136
+
The variable `$?` will be `True` only if all commands in the pipeline succeed.
137
+
138
+
```powershell
139
+
./initool delete settings.ini test | ./initool set - '' cache 1024 > settings.ini.new
140
+
if ($?) { move -Force settings.ini.new settings.ini }
141
+
```
142
+
134
143
#### Both
135
144
136
145
To retrieve only the value of a property rather than the whole property (the section, key, and value), use the flag `-v` or `--value-only`:
0 commit comments