INIVAR

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
BUGS
AUTHOR
REPORTING BUGS
COPYRIGHT

NAME

inivar - Query an INI file

SYNOPSIS

inivar -var variable [-sec section] [-num occurrence_number] [-tildeexpand] [-ini FILE]

DESCRIPTION

Prints to stdout the INI file result of a variable-in-section search, useful for scripts that want to pick things out of INI files.

Uses emc.ini as default filename. variable needs to be supplied. If section is omitted, first instance of variable will be looked for in any section. Otherwise, only a match of the variable in section will be returned.

OPTIONS

-var variable

The variable to search for, if multiple matches exists and -num is not specified, the first match is returned.

-sec section

The section to search in, if omitted, all sections are searched.

-num occurrence_number

The occurrence number specifies which instance of the variable within the FILE, and section if provided, should be returned. If omitted, the first matching occurrence is returned.

-tildeexpand

Replace the tilde (˜) with the home directory path (equivalent to $(HOME)) in the value obtained from variable in FILE.

-ini FILE

The INI file to search in, defaults to emc.ini.

EXIT STATUS

0

Success.

1

variable was not found.

-1

Failure.

BUGS

None known at this time.

AUTHOR

This man page written by andypugh, as part of the LinuxCNC project.

REPORTING BUGS

Report bugs at https://github.com/LinuxCNC/linuxcnc/issues

COPYRIGHT

Copyright (c) 2020 andypugh.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.