Hi,
Is it possible to find the total number of records processed by awk at begining.
NR gives the value at the end. Is there any variable available to find the value at the begining?
Thanks
----------
Suman (1 Reply)
Hello all,
Would appreciate if someone can help me out on the following requirement.
INPUT FILE:
--------------------------
TPS REPORT
abc def ghi
jkl mon pqr
stu vrs lll
END OF TPS REPORT
TPS REPORT
field1 field2 field3
field4 field5 field6 (8 Replies)
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
A file file1.txt exists having records like
The delimiter being "|"
X|_|Y|_|Z|_| (number of fields 7)
A|_|B|_| (number of fields 5)
X|_|Z|_|H|_| (number of fields 7)
A|_|D|_|S|_| (number of... (4 Replies)
Hi,
I have a comma (,) delimited file, in which few fields are enclosed with in double quotes " ". I have to print the records in the file which donot have expected number of field with the line number.
File1
====
name,desgnation,doj,project #header#... (7 Replies)
Hi all,
I have a tab-delimited text file of size 10Mb. I am trying to count the number of lines using,
grep -c . sample.txtor
wc -l < sample.txt or
awk 'END {print NR}' sample.txtAll these commands shows the count as 1, which means they are reading only the first header line of the file.... (3 Replies)
I would like to print the number of records of 2 files, and divide the two numbers
awk '{print NR}' file1 > output1
awk '{print NR}' file2 > output2
paste output1 output2 > output
awl '{print $1/$2}' output > output_2
is there a faster way? (8 Replies)
input:
ref.1;rack.1;1 #group1
ref.1;rack.1;2 #group1
ref.1;rack.2;1 #group2
ref.2;rack.3;1 #group3
ref.2;rack.3;2 #group3
ref.2;rack.3;3 #group3
Among records from same group (i.e. with same 1st and 2nd field - separated by ";"), I would need to keep the last record... (5 Replies)
Hi,
My input looks like that:
A|123|qwer
A|456|tyui
A|456|wsxe
B|789|dfgh
Using awk, I am trying to get:
A|123;456|qwer;tyui;wsxe
B|789|dfgh
For records with same $1, group all the $2 in a field (without replicates), and all the $3 in a field (without replicates).
What I have tried:... (6 Replies)
Hello all, I am having trouble with what should be an easy task, but seem to be missing something fundamental. I have two files, with File 1 consisting of a single field of many thousands of records. I also have File 2 with two fields and many thousands of records.
My goal is that when $1 of... (2 Replies)
Discussion started by: jvoot
2 Replies
LEARN ABOUT OPENSOLARIS
mlib_matrixmaximummag_s16c
mlib_MatrixMaximumMag_U8C(3MLIB) mediaLib Library Functions mlib_MatrixMaximumMag_U8C(3MLIB)NAME
mlib_MatrixMaximumMag_U8C, mlib_MatrixMaximumMag_S8C, mlib_MatrixMaximumMag_S16C, mlib_MatrixMaximumMag_S32C, mlib_MatrixMaximumMag_F32C,
mlib_MatrixMaximumMag_D64C - find the first element with the maximum magnitude in a matrix
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_MatrixMaximumMag_U8C(mlib_u8 *max, const mlib_u8 *x,
mlib_s32 m, mlib_s32 n);
mlib_status mlib_MatrixMaximumMag_S8C(mlib_s8 *max, const mlib_s8 *x,
mlib_s32 m, mlib_s32 n);
mlib_status mlib_MatrixMaximumMag_S16C(mlib_s16 *max, const mlib_s16 *x,
mlib_s32 m, mlib_s32 n);
mlib_status mlib_MatrixMaximumMag_S32C(mlib_s32 *max, const mlib_s32 *x,
mlib_s32 m, mlib_s32 n);
mlib_status mlib_MatrixMaximumMag_F32C(mlib_f32 *max, const mlib_f32 *x,
mlib_s32 m, mlib_s32 n);
mlib_status mlib_MatrixMaximumMag_D64C(mlib_d64 *max, const mlib_d64 *x,
mlib_s32 m, mlib_s32 n);
DESCRIPTION
Each of these functions finds the first element with the maximum magnitude in a complex matrix, then puts the real and imaginary parts of
it into max[0] and max[1], respectively.
PARAMETERS
Each of the functions takes the following arguments:
max Pointer to the first element with the maximum magnitude
x Pointer to the first element of the source matrix.
m Number of rows in the source matrix
n Number of columns in the source matrix
RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_MatrixMinimumMag_U8C(3MLIB), mlib_VectorMaximumMag_U8C(3MLIB), mlib_VectorMinimumMag_U8C(3MLIB), attributes(5)SunOS 5.11 2 Mar 2007 mlib_MatrixMaximumMag_U8C(3MLIB)