Crates.io | ini2command |
lib.rs | ini2command |
version | 0.1.2 |
source | src |
created_at | 2020-06-03 09:59:40.45293 |
updated_at | 2020-06-03 11:04:46.56659 |
description | Create a command from a value of an INI-file and execute it. |
homepage | |
repository | https://github.com/hardliner66/ini2command |
max_upload_size | |
id | 249595 |
size | 20,102 |
With cargo:
cargo install ini2command --force
ini2command 1.0
Create a command from a value of an INI-file and execute it.
USAGE:
ini2command [FLAGS] [OPTIONS] --ini <FILE> --property <NAME> [--] <COMMAND>...
FLAGS:
-d, --dry Print the command instead of executing it.
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-i, --ini <FILE> The path to the ini file
-p, --property <NAME> The property to use
-r, --search_string <STRING> The search string for use in the template [default: {}]
-s, --section <NAME> The section to use
ARGS:
<COMMAND>... The command template
conf.ini:
ip=8.8.8.8
[addresses]
server1=1.1.1.1
For global properties:
ini2command -i conf.ini -p ip -- ping {}
For properties within sections:
ini2command -i conf.ini -s addresses -p server1 -- ping {}
If {}
cannot be used for some reason:
ini2command -i conf.ini -p ip -r @@ -- ping @@