ini2command

Crates.ioini2command
lib.rsini2command
version0.1.2
sourcesrc
created_at2020-06-03 09:59:40.45293
updated_at2020-06-03 11:04:46.56659
descriptionCreate a command from a value of an INI-file and execute it.
homepage
repositoryhttps://github.com/hardliner66/ini2command
max_upload_size
id249595
size20,102
Steve Biedermann (hardliner66)

documentation

README

ini2command

Installation & Update

With cargo:

cargo install ini2command --force

Command Line

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

Examples

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 @@
Commit count: 7

cargo fmt