07-11-2012
Is the data in any particular order? Did it come from a database?
Do you have a database engine? Some processes are just not suitable for Shell tools.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have the following lines in a file
SANDI108085FRANKLIN WRAP 7285
SANDI109514ZIPLOC STRETCH N SEAL 7285
SANDI110198CHOICE DM 0911
SANDI111144RANDOM WEIGHT BRAND 0704
SANDI111144RANDOM WEIGHT BRAND 0738... (10 Replies)
Discussion started by: dhanamurthy
10 Replies
2. Shell Programming and Scripting
Input:
a
b
b
c
d
d
I need:
a
c
I know how to get this (the lines that have duplicates) :
b
d
sort file | uniq -d
But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Discussion started by: necroman08
3 Replies
3. Shell Programming and Scripting
I have a log file that is about 1.2 million lines long and about 300MB.
we need a way to clean up this file and only keep the last few thousand lines.
if i use tail command we run our of memory as the file is too big.
I do have a key word to match on.
example, we want to keep every line... (8 Replies)
Discussion started by: robsonde
8 Replies
4. UNIX for Dummies Questions & Answers
Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is:
1702938475,SNU022,201004
the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies
5. UNIX for Dummies Questions & Answers
Hey guys & gals,
I am hoping for some advice on a sed or awk command that will
allow to only print lines from a file that contain 3 numeric values.
From previous searches here I saw that ygemici used the sed command
to remove lines containing more than 3 numeric values ;
however how... (3 Replies)
Discussion started by: TAPE
3 Replies
6. UNIX for Dummies Questions & Answers
Hi
My 30 million line file has a header
chr start end strand ref_context repeat_masked s1_smpl_context s1_c_count s1_ct_count s1_non_ct_count s1_m% s1_score s1_snp s1_indels s2_smpl_context s2_c_count s2_ct_count s2_non_ct_count s2_m% s2_score s2_snp s2_indels ... (2 Replies)
Discussion started by: plumb_r
2 Replies
7. Shell Programming and Scripting
Hi,
I have a file (sorted by sort) with 8 tab delimited columns. The first column contains duplicated fields and I need to merge all these identical lines.
My input file:
comp100002 aaa bbb ccc ddd eee fff ggg
comp100003 aba aba aba aba aba aba aba
comp100003 fff fff fff fff fff fff fff... (5 Replies)
Discussion started by: falcox
5 Replies
8. Shell Programming and Scripting
Hi, I'd like to ask if anybody can help improve my code to move 1 million+ files from a directory to another:
find /source/dir -name file* -type f | xargs -I '{}' mv {} /destination/dir
I learned this line of code from this forum as well and it works fine. However, file movement is kinda... (6 Replies)
Discussion started by: agentgrecko
6 Replies
LEARN ABOUT HPUX
dtsearchreinit
DtSearchReinit(library call) DtSearchReinit(library call)
NAME
DtSearchReinit -- Reinitialize the DtSearch online API
SYNOPSIS
#include <Dt/Search.h>
int DtSearchReinit(
char ***dbnames,
int *dbcount);
DESCRIPTION
DtSearchReinit closes and reopens databases and other files as necessary, and reinitializes the search engine API.
It is typically used after either databases or the ocf file have been externally changed to force the search engine to reinitialize itself,
and to acquire the new database names if any.
It can also be used after any function returns DtSrREINIT to acquire the new database names.
ARGUMENTS
dbnames Specifies the address where a pointer to an array of static database name string pointers will be placed. The dbnames pointer
from a previous DtSearchInit or DtSearchReinit may no longer be valid. Each string identifies a single successfully opened data-
base.
A database name string from this array is required for most other API function calls. The dbn member in DtSrResult is an index
into this array.
dbcount Specifies a pointer where the size of the dbnames array will be stored.
RETURN VALUE
DtSearchReinit returns DtSrOK and the current dbnames array if the reinitialization was successful or if reinitialization was not neces-
sary.
It returns DtSrERROR and messages on the MessageList on any other condition.
SEE ALSO
DtSrAPI(3), DtSearchInit(3), DtSearchGetMessages(3), dtsrocffile(4), DtSearch(5)
DtSearchReinit(library call)