Skip to content
Command line tool for examining the contents of INI files ad-hoc. Written in C against libiniparser.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
debian
doc
pkg-config
src
LICENSE
Makefile.am
Makefile.in
README.mkd
aclocal.m4
compile
config.h.in
configure
configure.ac
depcomp
install-sh
missing

README.mkd

ini

ini is a command line program for examining the contents of INI files. It has been written to be used primarily in shell scripts but may have other applications.

The underlying INI parser library is libiniparser. ini's support for INI styles and constructs is limited to what the library provides.

ini has been written against iniparser 4.0 as distributed by the Arch Linux project.

Synopsis

Invocation forms:
  ini -h
  ini [ae:g:G:k:p:sv:V:] INI-FILE
Where:
  -a, --list-all-keys      List all keys
  -e, --exists $KEY        Test if the value at $KEY exists, return 0
                           if it does, otherwise return 2
  -G, --egrep $REGEX       List all keys matching the given extended regex
  -g, --grep $REGEX        List all keys matching the given POSIX regex
  -h                       Print this message and exit
  -k, --list-keys $SEC     List keys in section $SEC
  -p, --print $KEY         Print the value associated with $KEY and
                           return 0, otherwise print nothing and return 2
  -s, --list-sections      List INI sections
  -V, --egrep-value $REGEX List all keys the value of which matches the
                           given extended regex
  -v, --grep-value $REGEX  List all keys the value of which matches the
                           given POSIX regex

In the case that the INI-FILE doesn't exist, return 1. A $KEY is a
string of the format ${section}:${key}, completely lowercased. Colons
in $section and $key must be escaped with a backslash. Regexes are
case-insensitive and don't have captures enabled.

Building and Installing

On Arch Linux, the package ini-git (AUR4) is available in the AUR.

You need to have the following installed:

  • GNU automake and autoconf
  • pkg-config
  • A C99 compiler
  • libiniparser 4.0

Compile with:

autoreconf -f -i -s
./configure
make
make install

LICENSE

ini - examine INI files from the command line
Copyright (C) 2015 Jens John < dev at 2ion dot de >

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
You can’t perform that action at this time.