Hi Gurus,
Can awk be able to do this
source file:
1|SPFE2027G1|1PFE-7000|T34801188|5066-0844|
2|T34801188|5066-0844|T35002355|5066-0845|
3|T35002355|5066-0845|T35203409|QFBR-7798|
1|SPFE2027H1|1PFE-7000|T34801198|5066-0844|
2|T34801198|5066-0844|T35002365|5066-0845|
formatted into:... (1 Reply)
Hi ppl out there...
Can anyone help me with the shell script to extract data from an xml file.
My xml file looks like :
- <servlet>
<servlet-name>FrontServlet</servlet-name>
<display-name>FrontServlet</display-name>
... (3 Replies)
Hi
I need to calculate the number of occurrences of a item in a number of files using Perl.
The item appears continually throughout the files but in each case I only want to calculate it in certain blocks of the file.
Example - Calculalte the number of occurrences of a 'pass' in a block of... (0 Replies)
I have a .csv file
equipment,bandtype
abc,aws
def,mmds
ghi,umts
jkl,mmds
I can get the equipment from `hostname`.
In my script i want to check what is the hostname. then see if it exists in the.csv file. if it does then i want to store the second parameter(bandtype) for the corresponding... (3 Replies)
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
I am having a file, around 500 lines. which contains one letter words, two letters words,...and so on(up to 15 letter words and words are not seprated by line). I need to compare all 1 letter words with 3,4,5 and 6 letters word, all 2 letters words with 2,3,4 and 5 letters words and all 3 letters... (3 Replies)
I am trying to compare the data in lines 3 & 5 to see if they match up to the '-S570' (see first code set, all proprietary information has been removed from code set)
spawn telnet
Trying ...
Connected to CA-LOS1234-ASE-S570.cl .
Escape character is '^]'.
CA-LOS1234-ASE-S570
Username: ... (1 Reply)
Hi all,
I want to extract blocks of data from a file depending on the contents of that block.
The input file(table) has several blocks each starting with 'gene' in the first column. I want to extract only those blocks which do not have the expression '_T02' in the second column.
Input file ... (3 Replies)
Hi All
My input file is an XML and it has some tags and data rows at end.
Starting of data rows is <rs:data> and ending of data rows is </rs:data>.
Within sample data rows (2 rows) shown below, I want to extract data value after equal to sign (until space or "/" sign).
So if XML data... (7 Replies)
Hi Everyone,
I have a very simple problem and i am stuck in that from last 8 days. I tried many attempts, googled my query but all in vain.
I have a text file named "test.txt"
In that suppose i have contents like:
Java:
1 Object oriented programming language
2 Concepts of Abstraction... (5 Replies)
Discussion started by: Abhijeet Anand
5 Replies
LEARN ABOUT HPUX
dtdtsdatatypetoattributevalue
DtDtsDataTypeToAttributeValue(library call) DtDtsDataTypeToAttributeValue(library call)
NAME
DtDtsDataTypeToAttributeValue -- get an attribute value for a specified data type
SYNOPSIS
#include <Dt/Dts.h>
char *DtDtsDataTypeToAttributeValue(
const char *datatype,
const char *attr_name,
const char *opt_name);
DESCRIPTION
The DtDtsDataTypeToAttributeValue returns an attribute value for the specified data type name.
The datatype argument is a pointer to a data type name string.
The attr_name argument is a name of the attribute.
The opt_name argument can be used to specify a name to be associated with the data type. If the opt_name argument is not NULL, it is used
as a pseudo file name in typing; otherwise, certain attributes may be returned as NULL because the filename components could not be deter-
mined.
RETURN VALUE
Upon successful completion, the DtDtsDataTypeToAttributeValue function returns a pointer to a data attribute value string, or NULL if no
value could be determined.
APPLICATION USAGE
The application should use the DtDtsFreeAttributeValue(3) function to release the memory for the returned value.
The opt_name argument is useful when the attribute being returned contains a modifier string that depends on having a file name included.
For example, if the INSTANCE_ICON attribute had the value %name%.icon, opt_name would be used to derive the %name% portion of the attribute
value. See dtdtsfile(4).
EXAMPLES
The following takes a list of files as arguments and determines the description and actions for each file:
#include <Dt/Dts.h>
#define ATTRIBUTE1 "DESCRIPTION"
#define ATTRIBUTE2 "ACTIONS"
main (int argc, char **argv)
{
char *attribute;
char *datatype;
/* load data types database */
DtDtsLoadDataTypes();
argv++;
while (*argv) {
/* get data type file file */
datatype = DtDtsFileToDataType(*argv);
/* get first attribute for datatype */
attribute = DtDtsDataTypeToAttributeValue(datatype,
ATTRIBUTE1, *argv);
if (attribute)
printf("%s for file %s is %s
",
ATTRIBUTE1, *argv, attribute);
/* get second attribute for datatype */
attribute = DtDtsDataTypeToAttributeValue(datatype,
ATTRIBUTE2, NULL);
if (attribute)
printf("%s for file %s is %s
",
ATTRIBUTE2, *argv, attribute);
argv++;
}
DtDtsRelease();
exit(0);
}
SEE ALSO
Dt/Dts.h, DtDtsFileToDataType(3), DtDtsLoadDataTypes(3), DtDtsRelease(3), DtDtsFreeAttributeValue(3).
DtDtsDataTypeToAttributeValue(library call)