Hi All,
I have a file which is having 3 columns as (string string integer)
a b 1
x y 2
p k 5
y y 4
.....
.....
Question:
I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the... (6 Replies)
Hi would like to ask you guys any advise regarding my problem
I have this kind of data
file.txt
111111111,20
111111111,50
222222222,70
333333333,40
444444444,10
444444444,20
I need to get this
file1.txt
111111111,70
222222222,70
333333333,40
444444444,30
using this code I can... (6 Replies)
Hi,
I have a table to be imported for R as matrix or data.frame but I first need to edit it because I've got several lines with the same identifier (1st column), so I want to sum the each column (2nd -nth) of each identifier (1st column)
The input is for example, after sorted:
K00001 1 1 4 3... (8 Replies)
this is part of a KT i am going thru.
i am writing a script in bash shell, linux where i have 2 columns where 1st signifies the nth hour like 00, 01, 02...23 and 2nd the file size.
sample data attached.
Desired output is 3 columns which will give the nth hour, number of entries in nth hour and... (3 Replies)
Hi All,
I have a requirement where I need to find sum of values from column D through O present in a CSV file and check whether the sum of each Individual column matches with the value present for that corresponding column present in the trailer record.
For example, let's assume for column D... (9 Replies)
I have a file which need to be summed up using date column.
I/P:
2017/01/01 a 10
2017/01/01 b 20
2017/01/01 c 40
2017/01/01 a 60
2017/01/01 b 50
2017/01/01 c 40
2017/01/01 a 20
2017/01/01 b 30
2017/01/01 c 40
2017/02/01 a 10
2017/02/01 b 20
2017/02/01 c 30
2017/02/01 a 10... (6 Replies)
Hi Experts,
Please bear with me, i need help
I am learning AWk and stuck up in one issue.
First point : I want to sum up column value for column 7, 9, 11,13 and column15 if rows in column 5 are duplicates.No action to be taken for rows where value in column 5 is unique.
Second point : For... (12 Replies)
I have a file abc.csv, from which I need column 24(PurchaseOrder_TotalCost) to get the sum_of_amounts with date and row count into another file say output.csv
abc.csv-
UTF-8,,,,,,,,,,,,,,,,,,,,,,,,,
... (6 Replies)
Discussion started by: Tahir_M
6 Replies
LEARN ABOUT OPENSOLARIS
m_getvalues_layout
m_getvalues_layout(3LAYOUT) Layout Service Library Functions m_getvalues_layout(3LAYOUT)NAME
m_getvalues_layout - query layout values of a LayoutObject
SYNOPSIS
cc [ flag... ] file... -llayout [ library... ]
#include <sys/layout.h>
int m_getvalues_layout(const LayoutObject
layout_object, LayoutValues values, int *index_returned);
DESCRIPTION
The m_getvalues_layout() function queries the current setting of layout values within a LayoutObject.
The layout_object argument specifies a LayoutObject returned by the m_create_layout(3LAYOUT) function.
The values argument specifies the list of layout values that are to be queried. Each value element of a LayoutValueRec must point to a
location where the layout value is stored. That is, if the layout value is of type T, the argument must be of type T*. The values are
queried from the LayoutObject and represent its current state.
It is the user's responsibility to manage the space allocation for the layout values queried. If the layout value name has QueryValueSize
OR-ed to it, instead of the value of the layout value, only its size is returned. The caller can use this option to determine the amount of
memory needed to be allocated for the layout values queried.
RETURN VALUES
Upon successful completion, the m_getvalues_layout() function returns 0. If any value cannot be queried, the index of the value causing the
error is returned in index_returned, -1 is returned and errno is set to indicate the error.
ERRORS
The m_getvalues_layout() function may fail if:
EINVAL The layout value specified by index_returned is unknown, its value is invalid, or the layout_object argument is invalid. In the
case of an invalid layout_object argument, the value returned in index_returned is -1.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO m_create_layout(3LAYOUT), attributes(5), standards(5)SunOS 5.11 7 Aug 2006 m_getvalues_layout(3LAYOUT)