thanks for the quick answer but the output is not the expected:
I want to remove just the lines where the 4th column have consecutive values not all the others.
I am a beginner in Unix. Though have been asked to write a script to filter(remove duplicates) data from a .dat file. File is very huge containig billions of records.
contents of file looks like
30002157,40342424,OTC,mart_rec,100, ,0
30002157,40343369,OTC,mart_rec,95, ,0... (6 Replies)
Hi, I have a huge file which is about 50GB. There are many lines. The file format likes
21 rs885550 0 9887804 C C T C C C C C C C
21 rs210498 0 9928860 0 0 C C 0 0 0 0 0 0
21 rs303304 0 9941889 A A A A A A A A A A
22 rs303304 0 9941890 0 A A A A A A A A A
The question is that there are a few... (4 Replies)
Trying to cut down the size of some log files. Now that I write this out it looks more dificult than i thought it would be.
Need a bash script or command that goes sequentially through all lines of a file, and does this:
if field1 (space separated) is the number 2012 print the entire line. Do... (7 Replies)
I have a csv file that I would like to remove duplicate lines based on field 1 and sort. I don't care about any of the other fields but I still wanna keep there data intact. I was thinking I could do something like this but I have no idea how to print the full line with this. Please show any method... (8 Replies)
Hi,
I have a file with fields like below:
A;XYZ;102345;222
B;XYZ;123243;333
C;ABC;234234;444
D;MNO;103345;222
E;DEF;124243;333
desired output:
C;ABC;234234;444
D;MNO;103345;222
E;DEF;124243;333
ie, if the 4rth field is a duplicate.. i need only those records where... (5 Replies)
Hi All,
i have input file like below...
CA009156;20091003;M;AWBKCA72;123;;CANADIAN WESTERN BANK;EDMONTON;;2300, 10303, JASPER AVENUE;;T5J 3X6;;
CA009156;20091003;M;AWBKCA72;321;;CANADIAN WESTERN BANK;EDMONTON;;2300, 10303, JASPER AVENUE;;T5J 3X6;;
CA009156;20091003;M;AWBKCA72;231;;CANADIAN... (2 Replies)
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 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)
Hi All,
I am storing the result in the variable result_text using the below code.
result_text=$(printf "$result_text\t\n$name") The result_text is having the below text. Which is having duplicate lines.
file and time for the interval 03:30 - 03:45
file and time for the interval 03:30 - 03:45 ... (4 Replies)
Discussion started by: nalu
4 Replies
LEARN ABOUT NETBSD
ubc_release
UBC(9) BSD Kernel Developer's Manual UBC(9)NAME
ubc -- unified buffer cache
SYNOPSIS
#include <uvm/uvm.h>
void *
ubc_alloc(struct uvm_object *uobj, voff_t offset, vsize_t *lenp, int advice, int flags);
void
ubc_release(void *va, int flags);
int
ubc_uiomove(struct uvm_object *uobj, struct uio *uio, vsize_t todo, int advice, int flags);
void
ubc_purge(struct uvm_object *uobj);
DESCRIPTION
ubc_alloc() creates a kernel mapping of uobj starting at offset offset. The desired length of the mapping is pointed to by lenp, but the
actual mapping may be smaller than this. lenp is updated to contain the actual length mapped. advice is the access pattern hint, which must
be one of
UVM_ADV_NORMAL No hint
UVM_ADV_RANDOM Random access hint
UVM_ADV_SEQUENTIAL Sequential access hint (from lower offset to higher offset)
The possible flags are
UBC_READ Mapping will be accessed for read.
UBC_WRITE Mapping will be accessed for write.
UBC_FAULTBUSY Fault in window's pages already during mapping operation. Makes sense only for write.
Once the mapping is created, it must be accessed only by methods that can handle faults, such as uiomove() or kcopy(). Page faults on the
mapping will result in the object's pager method being called to resolve the fault.
ubc_release() frees the mapping at va for reuse. The mapping may be cached to speed future accesses to the same region of the object. The
flags can be any of
UBC_UNMAP Do not cache mapping.
ubc_uiomove() allocates an UBC memory window, performs I/O on it and unmaps the window. The advice parameter takes the same values as the
respective parameter in ubc_alloc() and the flags parameter takes the same arguments as ubc_alloc() and ubc_release(). Additionally, the
flag UBC_PARTIALOK can be provided to indicate that it is acceptable to return if an error occurs mid-transfer.
ubc_purge() disassociates all UBC structures from an empty UVM object, specified by uobj.
CODE REFERENCES
The ubc subsystem is implemented within the file sys/uvm/uvm_bio.c.
SEE ALSO pmap(9), uiomove(9), uvm(9), vnode(9), vnodeops(9)
Chuck Silvers, "UBC: An Efficient Unified I/O and Memory Caching Subsystem for NetBSD", Proceedings of the FREENIX Track: 2000 USENIX Annual
Technical Conference, USENIX Association, http://www.usenix.org/event/usenix2000/freenix/full_papers/silvers/silvers.pdf, 285-290, June
18-23, 2000.
HISTORY
UBC first appeared in NetBSD 1.6.
AUTHORS
Chuck Silvers <chuq@chuq.com> designed and implemented the UBC part of UVM, which uses UVM pages to cache vnode data rather than the tradi-
tional buffer cache buffers.
BSD June 14, 2011 BSD