~ecs/ini

ini/ini.1.scd -rw-r--r-- 942 bytes
7edc48e0 — Eyal Sawady ini.1: better indentation in EXAMPLES 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
ini(1)

# NAME

ini - read INI files

# SYNOPSIS

*ini* _file_ [_section_ [_key_]]

# DESCRIPTION

*ini* parses _file_ as INI and prints the requested information to _stdout_.
If _file_ is "-", *ini* reads from _stdin_.

If only _file_ is not given, *ini* prints out the sections in _file_.

If _section_ is given, and _key_ is not given, *ini* prints out the keys in
_section_.

If _key_ is given, *ini* prints the value associated with _key_ in _section_.

If there are any keys before the first section in _file_, they will be listed
under the empty section.

# EXAMPLES

```
$ cat <<EOF >test.ini
hello = world
[section]
foo: bar ; this is a comment
# this is another comment
EOF

$ ini test.ini

section
$ ini test.ini ""
hello
$ ini test.ini section
foo
$ ini test.ini "" hello
world
$ cat test.ini | ini - section foo
bar
```

# AUTHORS

Maintained by ~ecs <https://git.sr.ht/~ecs>. Patches welcome at
<~ecs/public-inbox@lists.sr.ht>.