inivar - Query an INI file
inivar -var variable [-sec section] [-num occurrence_number] [-tildeexpand] [-ini FILE]
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.
-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.
0
Success.
1
variable was not found.
-1
Failure.
None known at this time.
This man page written by Andy Pugh, as part of the LinuxCNC project.
Report bugs at https://github.com/LinuxCNC/linuxcnc/issues.
Copyright (c) 2020 Andy Pugh.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.