PROPERTIES(3) BSD Library Functions Manual PROPERTIES(3)NAME
properties_read, property_find, properties_free -- functions to allow creating simple property lists from ASCII file data
LIBRARY
System Utilities Library (libutil, -lutil)
SYNOPSIS
#include <libutil.h>
properties
properties_read(int fd);
char *
property_find(properties list, const char *name);
void
properties_free(properties list);
DESCRIPTION
typedef struct _properties {
struct _properties *next;
char *name;
char *value;
} *properties;
The function properties_read() reads name = value pairs from the file descriptor passed in fd and returns the head of a new property list,
assuming that the file's contents have been parsed properly, or NULL in case of error.
The property_find() function returns the associated value string for the property named name if found, otherwise NULL. The value returned
may be up to PROPERTY_MAX_VALUE bytes in length.
The properties_free() function is used to free the structure returned by properties_read() when it is no longer needed.
FILE FORMAT
Each property in the file is assumed to have the format of name = value where name is an alphanumeric string (and any punctuation not includ-
ing the `=' character) and value is an arbitrary string of text terminated by a newline character. If newlines are desired, the entire value
should be enclosed in { } (curly-bracket) characters. Any line beginning with a # or ; character is assumed to be a comment and will be
ignored.
AUTHORS
Jordan Hubbard
BUGS
Simplistic.
BSD October 7, 1998 BSD
Check Out this Related Man Page
PROPERTIES(3) BSD Library Functions Manual PROPERTIES(3)NAME
properties_read, property_find, properties_free -- functions to allow creating simple property lists from ASCII file data
LIBRARY
System Utilities Library (libutil, -lutil)
SYNOPSIS
#include <libutil.h>
properties
properties_read(int fd);
char *
property_find(properties list, const char *name);
void
properties_free(properties list);
DESCRIPTION
typedef struct _properties {
struct _properties *next;
char *name;
char *value;
} *properties;
The function properties_read() reads name = value pairs from the file descriptor passed in fd and returns the head of a new property list,
assuming that the file's contents have been parsed properly, or NULL in case of error.
The property_find() function returns the associated value string for the property named name if found, otherwise NULL. The value returned
may be up to PROPERTY_MAX_VALUE bytes in length.
The properties_free() function is used to free the structure returned by properties_read() when it is no longer needed.
FILE FORMAT
Each property in the file is assumed to have the format of name = value where name is an alphanumeric string (and any punctuation not includ-
ing the `=' character) and value is an arbitrary string of text terminated by a newline character. If newlines are desired, the entire value
should be enclosed in { } (curly-bracket) characters. Any line beginning with a # or ; character is assumed to be a comment and will be
ignored.
AUTHORS
Jordan Hubbard
BUGS
Simplistic.
BSD October 7, 1998 BSD
Hi,
I have a config.xml which cointains the tags like
<CONFIG>
<PROPERTY name="port" value="1111"/>
<PROPERTY name="dbname" value="ABCDE"/>
<PROPERTY name="connectstring" value="xyz/pwd"/>
</CONFIG>
This file is in some directory at UNix box.
I need to write a... (4 Replies)
I have sourced a property file in my script like this to load some variables in the script
Then i am able to echo all the property file values inside script but the script is not able to recognize other unix commands
#!/bin/bash
. build.properties
mkdir build
i am getting error ... (3 Replies)
Hi,
Iam in a need for a script/function in KSH where I want to read a text file (property file) in block by block. Here is the example:
Heading Name Descripton
Block Block1 Value1 Description
Property Name Value
Property Name Value
Property Name Value
Property Name Value
Property Name... (7 Replies)
Hi All,
I'm Raghavendra. I have a very urgent requirement to develop a Shell Script which will allow to use variables in a property file as demonstarted below
var1=UNIX
var2=LINUX
var3=WINDOWS
var4=$var1,$var2
var5=$var3
Could you please help me to develop a shell script which can... (2 Replies)
Hello Everyone!
I have a Sun Fire E2900. When I run a prtdiag -v, it fails to give complete information. It fails with the following error message "Prtdiag failed!Property not found".
Please help.
# which prtdiag
/usr/sbin/prtdiag
# ls -l /usr/sbin/prtdiag
-r-xr-xr-x 4 root bin 512... (10 Replies)
Hi,
I have a property file called "inspector.properties".
In this property file stands the following:
inspect=ON
Now I want to have a shell script that when you run it, changes the ON in OFF in this property file.
Is this possible with sed?
Can anybody help me with this?
Tnx very much. (5 Replies)
Hi All,
I have 2 properties files - one is a master templete and other one is a node specific properties file, I need to comapre these 2 properties files and make sure the node Specific properties file contains all the properties in the master temple properties file else report the missing... (5 Replies)
Hi!
i need a script that can read a property file.
i.e., A script to read a "property" from property file.
Read the property value and
based on value of property, decide whether to start the some dataload activity or not.
Its urngent. Can anyone help me out???:( (7 Replies)
Hi genius,
Following is the problem.
We have one templete file(input file) where some variables will be used
Example:
word1 word2 &{word3}
word4 ${word5} word6
And also we have one property file where we define these variables
Example:
word3= something
Word5= something
Need to read... (5 Replies)
Hi All,
Need your help to fix one script.
Main agenda is:
1. Read a property file.
2. Delete all files in directory except the name from Property file.
I am trying to read property file for value then deleting all files from directory except THAT value/name.
I have tried so far as... (3 Replies)
I have multiple files with pattern of "*.tps (example:tps-20170307170421560-1053.tps)" in my log directory(files are in different sub directories).
entries in files are given below. I want to extract highest value of endtime accross all files.
"endTime :1488902691462"
... (7 Replies)