Sponsored Content
Top Forums Shell Programming and Scripting Report a missing property and property value mis match script. Post 302549645 by jayka on Tuesday 23rd of August 2011 02:04:26 PM
Old 08-23-2011
Report a missing property and property value mis match script.

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 property
and secondly
if value provided in the master template then same value must be in the node specific file if not report mismatch

here are the 2 example property files :

1. master-templete.properties
## Proxy name
jboss.proxy.name=

## PTMS Database
db.host.1=
db.port.1=1521
db.host.2=
db.port.2=1521

#EOF

2.nodeOne.properties
## Proxy name

## PTMS Database
db.host.1=10.3.61.55
db.port.1=1521
db.host.2=10.3.61.55
db.port.2=1521


#EOF
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem printing the property of xml file via shell script

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)
Discussion started by: neeto
4 Replies

2. Shell Programming and Scripting

source a property file in script give error

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)
Discussion started by: codeman007
3 Replies

3. Shell Programming and Scripting

URGENT: Script/Function needed to read text property files in block wise

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)
Discussion started by: ysreenivas
7 Replies

4. Shell Programming and Scripting

Script to update Property Entry Values

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)
Discussion started by: raghavstunner
2 Replies

5. Shell Programming and Scripting

To read xml value depending on property

Hi have some xml like this <example> <Cell Name="Cell1" ConfigureHost="claas" Role="APPSERV,BACKEND"> <Node Name="aaaaa" Role="APPSERV,BACKEND,CLM"/> <Node Name="vvvv" Role="APPSERV,BACKEND"/> <Mercury Type="default" FQDN="ssssss" PrimaryReturnFQDN=""/> </Cell> ... (1 Reply)
Discussion started by: javaholics
1 Replies

6. Shell Programming and Scripting

Reading a property file through shell script???

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)
Discussion started by: sukhdip
7 Replies

7. Shell Programming and Scripting

Not to remove Files based on property value

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)
Discussion started by: sukhdip
3 Replies
ddi_prop_exists(9F)					   Kernel Functions for Drivers 				       ddi_prop_exists(9F)

NAME
ddi_prop_exists - check for the existence of a property SYNOPSIS
#include <sys/ddi.h> #include <sys/sunddi.h> int ddi_prop_exists(dev_t match_dev, dev_info_t *dip, uint_t flags, char *name); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
match_dev Device number associated with property or DDI_DEV_T_ANY. dip Pointer to the device info node of device whose property list should be searched. flags Possible flag values are some combination of: "small and bold">DDI_PROP_DONTPASS Do not pass request to parent device information node if the property is not found. DDI_PROP_NOTPROM Do not look at PROM properties (ignored on platforms that do not support PROM properties). name String containing the name of the property. DESCRIPTION
ddi_prop_exists() checks for the existence of a property regardless of the property value data type. Properties are searched for based on the dip, name, and match_dev. The property search order is as follows: 1. Search software properties created by the driver. 2. Search the software properties created by the system (or nexus nodes in the device info tree). 3. Search the driver global properties list. 4. If DDI_PROP_NOTPROM is not set, search the PROM properties (if they exist). 5. If DDI_PROP_DONTPASS is not set, pass this request to the parent device information node. 6. Return 0 if not found and 1 if found. Usually, the match_dev argument should be set to the actual device number that this property is associated with. However, if the match_dev argument is DDI_DEV_T_ANY, then ddi_prop_exists() will match the request regardless of the match_dev the property was created with. That is the first property whose name matches name will be returned. If a property was created with match_dev set to DDI_DEV_T_NONE then the only way to look up this property is with a match_dev set to DDI_DEV_T_ANY. PROM properties are always created with match_dev set to DDI_DEV_T_NONE. name must always be set to the name of the property being looked up. RETURN VALUES
ddi_prop_exists() returns 1 if the property exists and 0 otherwise. CONTEXT
These functions can be called from user or kernel context. EXAMPLES
Example 1: : Using ddi_prop_exists() The following example demonstrates the use of ddi_prop_exists(). /* * Enable "whizzy" mode if the "whizzy-mode" property exists */ if (ddi_prop_exists(xx_dev, xx_dip, DDI_PROP_NOTPROM, "whizzy-mode") == 1) { xx_enable_whizzy_mode(xx_dip); } else { xx_disable_whizzy_mode(xx_dip); } SEE ALSO
ddi_prop_get_int(9F), ddi_prop_lookup(9F), ddi_prop_remove(9F), ddi_prop_update(9F) Writing Device Drivers SunOS 5.10 22 May 1995 ddi_prop_exists(9F)
All times are GMT -4. The time now is 09:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy