This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################################################################### | |
# Bash function get_toml_value() to get the value of a key in a section of a TOML file. | |
# Versioned here: https://gist.github.com/kwmiebach/e42dc4a43d5a2a0f2c3fdc41620747ab | |
# Call it like this: | |
# value=$(get_toml_value "./conf/config.toml" "server_b" "domain") | |
# Result should be "my123.example.com" in the case of this example file: | |
# --------------------------- | |
# [server_a] | |
# proto = "https" | |
# domain = "test.example.net" |