34 lines
475 B
Markdown
34 lines
475 B
Markdown
# Bash INI
|
|
A simple ini parser written in bash
|
|
|
|
|
|
|
|
## Setup Instructions
|
|
Install required tools:
|
|
```console
|
|
$ sudo apt update
|
|
$ sudo apt install sed
|
|
```
|
|
|
|
Clone git repository:
|
|
```console
|
|
$ git clone https://git.tjdev.de/DrMaxNix/bash-ini.git
|
|
$ cd bash-ini
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
```bash
|
|
# include the library
|
|
source "ini.sh"
|
|
|
|
# parse a config
|
|
ini_parse "config.ini"
|
|
|
|
# read a value
|
|
echo "${ini__section_1[first_value]}"
|
|
```
|
|
|
|
An in-depth example can be found in the `example` folder!
|