Skip to content

leickh/BashConf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BashConf

This repository contains text format parsers written in Bash which are particularly useful for configurations, for example in build scripts.

INI

The INI parser has the following usage pattern:

./ini.sh <action> [action-arg] <input-file>

All actions except --help support the argument -o <path> or the alternative --output <path> which tells where to write the result. If the no output path is given, stdout is used.

-l or --list-sections

List all sections in the file, one item per line. This action does not need any specialized arguments.

./ini.sh --list-sections configuration.ini -o sections.txt

-f or --list-fields

List all fields within a section. This action requires the name of the section of which to get the fields.

./ini.sh --list-fields Arguments configuration.ini -o fields.txt

-g, --get or --get-value

Returns the value identified right after the action in the format of <section>:<key>. An example for it is:

./ini.sh --get-value General:Name configuration.ini -o name.txt

About

Configuration Parsers written in Bash

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages