https://github.com/solarnetwork/prop-util
A command-line Java application for managing Java properties files.
https://github.com/solarnetwork/prop-util
Last synced: 11 months ago
JSON representation
A command-line Java application for managing Java properties files.
- Host: GitHub
- URL: https://github.com/solarnetwork/prop-util
- Owner: SolarNetwork
- Created: 2019-05-01T06:20:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T02:37:20.000Z (about 3 years ago)
- Last Synced: 2025-01-31T07:32:06.221Z (about 1 year ago)
- Language: Java
- Size: 130 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prop Util
This project is a command-line Java application for managing Java properties files, with no
external dependencies.
# Example usage
Given a properties file with the following content:
```
foo.bim.bam = bar
dooh = mybad
```
the following command:
```sh
java -jar sn-prop-util.jar modify --file foo.properties --set foo=bar --delete dooh --add foo.bim.bam=blah
```
would modify the file so it contains the following content:
```
foo.bim.bam = bar
foo = bar
```
The `--set` option unconditionally sets a property value (overwriting any existing value), the
`--delete` option deletes a property value, and the `--add` option only adds a property if that
property does not already exist.