Sponsored Content
Top Forums Shell Programming and Scripting URGENT: Script/Function needed to read text property files in block wise Post 302172620 by ysreenivas on Tuesday 4th of March 2008 09:39:12 AM
Old 03-04-2008
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 Value
Property Name Value
Property Name Value


Block Block2 Value2 Description
Property Name Value
Property Name Value
Property Name Value
Property Name Value
Property Name Value
Property Name Value
Property Name Value


As per the above example, my requirement is similar to this. I want to read entire bock including its name, values and process them, along with them I want to read their Property Names/Values and create under that Block.

The main requirement is, no other block's Property's should be mingled/interfered with other Block's Properties.

Any help is greatly appreciated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Urgent answer needed, please: help with a text editor

I'm sorry if this has been posted before, but I'm in a big hurry and I need a pretty quick answer: I have to make a project for school which consists of many BASH scripts. At school we have Sun Sparcs. During the laboratory hours I used to open the text editor (in the graphics interface), edit the... (4 Replies)
Discussion started by: MtFR
4 Replies

2. UNIX for Dummies Questions & Answers

Urgent help needed to delete some text without opening the file in unix

Hi To delete some text in 2 files in line1 ( not complete line) in unix without opening the files. For example: source file is like this <?xml version="1.0"... (5 Replies)
Discussion started by: pyaranoid
5 Replies

3. UNIX for Advanced & Expert Users

How to compare two text files in column wise?

Hi All, I have two txt files like this File1: no name ---------- 12 aaaa 23 bbbb 55 cccc File2 dname dno ------------ civil 33 mech 55 arch 66 Now i want to compare col1 from File and col2 from File2, if its match i want fetch all columns from... (3 Replies)
Discussion started by: psiva_arul
3 Replies

4. Shell Programming and Scripting

Need to zip the files date wise --urgent Help needed

Hi all, this is my first post, i need to write a script to zip the files with datewise below are the log files. -rw------- 1 root sso 85316156 May 24 22:11 core_test_smservaz_104_104_1243217459_8896 -rw------- 1 root sso 90413304 May 25 22:12 core_test_smservaz_104_104_1243303895_20912... (4 Replies)
Discussion started by: lcschandu
4 Replies

5. Shell Programming and Scripting

Shell Script Needed to Read a text from a list files

Hi, Below is my issue which I desperately need and I want a shell script which can do this job. I need this script as I m planning to put this for a system health check. Please assist me. 1. There are 10 log files in a particular location. 2. open each log file. Goto to the end of the... (4 Replies)
Discussion started by: kashriram
4 Replies

6. Shell Programming and Scripting

Combine Multiple text or csv files column-wise

Hi All I am trying to combine columns from multiple text files into a single file using paste command but the record length being unequal in the different files the data is running over to the closest empty cell on the left. Please see below. What can i do to resolve this ? File 1 File... (15 Replies)
Discussion started by: venky_ibm
15 Replies

7. Shell Programming and Scripting

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... (5 Replies)
Discussion started by: jayka
5 Replies

8. Shell Programming and Scripting

how to read two text files in the same shell script

Folks i have written two scripts that do reading of csv files , i am currently fetching the all part of the line in to variables and braking the line into several variables. I am doing the same thing in an another shell script, i want to integrate both the scripts in to a single one where i can... (2 Replies)
Discussion started by: venu
2 Replies

9. Shell Programming and Scripting

Script help needed(lookup 2 text files)

Hi, iam new to unix scripting need a help. The scenario is i have 2 text files. a.txt has colA colB colC colD JKU1270A JKU1042A 9 1 JKU1270A JKU1042B 9 1 JKU1270A JKU1042C 9 1 JKU1270B JKU1107B 9 1 JKU1270B JKU1107C 9 1... (1 Reply)
Discussion started by: tech_frk
1 Replies

10. Shell Programming and Scripting

How to read files by Server Creation date wise?

Hi All, I would have many files in the server with xyz*.dat -- Static file name Physical files: xyz1.dat - 01PM xyz2.dat - 02PM xyz3.dat - 03PM In present version we are using for f in $file_name do fname=`ls $f | grep -v ^'\|'$ | sed s/' '/'\\ '/g` .... sqlldr... (4 Replies)
Discussion started by: Dharv
4 Replies
libpicl(3PICL)						      PICL Library Functions						    libpicl(3PICL)

NAME
libpicl - PICL interface library SYNOPSIS
cc [ flag ... ] file ... -lpicl [ library ... ] #include <picl.h> DESCRIPTION
The PICL interface is the platform-independent interface for clients to access the platform information. The set of functions and data structures of this interface are defined in the <picl.h> header. The information published through PICL is organized in a tree, where each node is an instance of a well-defined PICL class. The functions in the PICL interface allow the clients to access the properties of the nodes. The name of the base PICL class is picl, which defines a basic set of properties that all nodes in the tree must possess. The following ta- ble shows the property set of a picl class node. +-----------------------------+------------------------------------+ | Property Name | Property Value | +-----------------------------+------------------------------------+ |name |The name of the node | +-----------------------------+------------------------------------+ |_class |The PICL class name of the node | +-----------------------------+------------------------------------+ |_parent |Node handle of the parent node | +-----------------------------+------------------------------------+ |_child |Node handle of the first child node | +-----------------------------+------------------------------------+ |_peer |Node handle of the next peer node | +-----------------------------+------------------------------------+ Property names with a a leading underscore ('_') are reserved for use by the PICL framework. The property names _class, _parent, _child, and _peer are reserved names of the PICL framework, and are used to refer to a node's parent, child, and peer nodes, respectively. A client shall access a reserved property by their names only as they do not have an associated handle. The property name is not a reserved property, but a mandatory property for all nodes. Properties are classified into different types. Properties of type integer, unsigned-integer, and float have integer, unsigned integer, and floating-point values, respectively. A table property type has the handle to a table as its value. A table is a matrix of properties. A reference property type has a handle to a node in the tree as its value. A reference property may be used to establish an association between any two nodes in the tree. A timestamp property type has the value of time in seconds since Epoch. A bytearray property type has an array of bytes as its value. A charstring property type has a nul (' ') terminated sequence of ASCII characters. The size of a property specifies the size of its value in bytes. A void property type denotes a property that exists but has no value. The following table lists the different PICL property types enumerated in picl_prop_type_t. +-----------------------------+-----------------------------+ | Property Type | Property Value | +-----------------------------+-----------------------------+ |PICL_PTYPE_VOID |None | +-----------------------------+-----------------------------+ |PICL_PTYPE_INT |Is an integer | +-----------------------------+-----------------------------+ |PICL_PTYPE_UNSIGNED_INT |Is an unsigned integer | +-----------------------------+-----------------------------+ |PICL_PTYPE_FLOAT |Is a floating-point number | +-----------------------------+-----------------------------+ |PICL_PTYPE_REFERENCE |Is a PICL node handle | +-----------------------------+-----------------------------+ Reference Property Naming Convention Reference properties may be used by plug-ins to publish properties in nodes of different classes. To make these property names unique, their names must be prefixed by _picl_class_name_, where picl_class_name is the class name of the node referenced by the property. Valid PICL class names are combinations of uppercase and lowercase letters 'a' through 'z', digits '0' through '9', and '-' (minus) characters. The string that follows the '_picl_class_name_' portion of a reference property name may be used to indicate a specific property in the referenced class, when applicable. Property Information The information about a node's property that can be accessed by PICL clients is defined by the picl_propinfo_t structure. typedef struct { picl_prop_type_t type; /* property type */ unsigned int accessmode; /* read, write */ size_t size; /* item size or string size */ char name[PICL_PROPNAMELEN_MAX]; } picl_propinfo_t; The type member specifies the property value type and the accessmode specifies the allowable access to the property. The plug-in module that adds the property to the PICL tree also sets the access mode of that property. The volatile nature of a property created by the plug- in is not visible to the PICL clients. The size member specifies the number of bytes occupied by the property's value. The maximum allow- able size of property value is PICL_PROPSIZE_MAX, which is set to 512KB. Property Access Modes The plug-in module may publish a property granting a combination of the following access modes to the clients: #define PICL_READ 0x1 /* read permission */ #define PICL_WRITE 0x2 /* write permission */ Property Names The maximum length of the name of any property is specified by PICL_PROPNAMELEN_MAX. Class Names The maximum length of a PICL class name is specified by PICL_CLASSNAMELEN_MAX. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
libpicl(3LIB), attributes(5) SunOS 5.11 28 Mar 2000 libpicl(3PICL)
All times are GMT -4. The time now is 11:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy