If I recall correctly, cygwin and win7 not -64 is 32 bit, so 'a' may get too big for the address space of the awk process. Depending on ram size, it might eventually thrash a bit. The awk solution, a hash map, does not support parallism.
The classic, robust solution is 'sort -u <file_set>' but tends to be slower. You can parallelize the sort with a command of the form:
where the nicer ksh or bash makes named pipes of the '<(...)' that run concurrently. I like twice the core count <(sort)'s, assuming 50% i/o delay. The final pass of the <(sort)'s feeds the sort -m merge parent.
ETL programs like Ab Initio know how to tell parallel processes to split up big files and process each part separately, even when the files are linefeed delimited (they all agree to search up (or down) for the dividing linefeed closest to N bytes down file). Does anyone know of a utility that can split a file this way (without reading it sequentially)? 'GNU parallel?'
I have a file which consists of 1000 entries. Out of 1000 entries i have 500 Duplicate Entires. I want to remove the first Duplicate Entry (i,e entire Line) in the File.
The example of the File is shown below:
8244100010143276|MARISOL CARO||MORALES|HSD768|CARR 430 KM 1.7 ... (1 Reply)
Hi,
My awk program is failing. I figured out using command
od -c filename
that the last line of the file doesnt end with a new line character.
Mine is an automated process because of this data is missing.
How do i handle this?
I want to append new line character at the end of last... (2 Replies)
i have the long file more than one ns and www and mx in the line like .
i need the first ns record and first www and first mx from line .
the records are seperated with tthe ; i am try ing in awk scripting not getiing the solution.
... (4 Replies)
Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt.
and i am stuck.
list=`cat /u/Test/programs`;
psg "ServTest" | awk -v listawk=$list '{
cmd_name=($5 ~ /^/)? $9:$8
for(pgmname in listawk)
... (6 Replies)
I have an extremely large csv file that I need to search the second field, and upon matches update the last field...
I can pull the line with awk.. but apparently you cant use awk to directly update the file? So im curious if I can use sed to do this... The good news is the field I want to... (5 Replies)
Folks ,
i want to read a csv file line by line till the end of file and filter the text in the line and append everything into a variable.
csv file format is :-
trousers:shirts,price,50
jeans:tshirts,rate,60
pants:blazer,costprice,40
etc
i want to read the first line and get... (6 Replies)
I have several hundreds of tiny files which need to be concatenated into one single line and all those in a single file. Some files have several blank lines. Tried to use this script but failed on it.
awk 'END { print r } r && !/^/ { print FILENAME, r; r = "" }{ r = r ? r $0 : $0 }' *.txt... (8 Replies)
I'm looking to remove duplicate rows from a CSV file with a twist.
The first row is a header.
There are 31 columns. I want to remove duplicates when the first 29 rows are identical ignoring row 30 and 31 BUT the duplicate that is kept should have the shortest total character length in rows 30... (6 Replies)
Hi all,
I've got a file that has 12 fields. I've merged 2 files and there will be some duplicates in the following:
FILE:
1. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, 100
2. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, (EMPTY)
3. CDC, 54321, TEST3,... (4 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
LEARN ABOUT SUNOS
mlib_vectorminimummag_u8c
mlib_VectorMinimumMag_U8C(3MLIB) mediaLib Library Functions mlib_VectorMinimumMag_U8C(3MLIB)NAME
mlib_VectorMinimumMag_U8C, mlib_VectorMinimumMag_S8C, mlib_VectorMinimumMag_S16C, mlib_VectorMinimumMag_S32C, mlib_VectorMinimumMag_F32C,
mlib_VectorMinimumMag_D64C - find the first element with the minimum magnitude in a vector
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_VectorMinimumMag_U8C(mlib_u8 *min, const mlib_u8 *x, mlib_s32 n);
mlib_status mlib_VectorMinimumMag_S8C(mlib_s8 *min, const mlib_s8 *x, mlib_s32 n);
mlib_status mlib_VectorMinimumMag_S16C(mlib_s16 *min, const mlib_s16 *x, mlib_s32 n);
mlib_status mlib_VectorMinimumMag_S32C(mlib_s32 *min, const mlib_s32 *x, mlib_s32 n);
mlib_status mlib_VectorMinimumMag_F32C(mlib_f32 *min, const mlib_f32 *x, mlib_s32 n);
mlib_status mlib_VectorMinimumMag_D64C(mlib_d64 *min, const mlib_d64 *x, mlib_s32 n);
DESCRIPTION
Each of these functions finds the first element with the minimum magnitude in a complex vector, then puts the real and imaginary parts of
it into min[0] and min[1], respectively.
PARAMETERS
Each of the functions takes the following arguments:
min Pointer to the first element with the minimum magnitude.
x Pointer to the first element of the source vector.
n Number of elements in the source vector.
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 |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_VectorMaximumMag_U8C(3MLIB), mlib_MatrixMaximumMag_U8C(3MLIB), mlib_MatrixMinimumMag_U8C(3MLIB), attributes(5)SunOS 5.10 9 Nov 2004 mlib_VectorMinimumMag_U8C(3MLIB)