Sponsored Content
Top Forums Shell Programming and Scripting NAWK array to store lines from huge file Post 302396969 by sharif on Saturday 20th of February 2010 02:18:59 AM
Old 02-20-2010
NAWK array to store lines from huge file

Hi,
I would like to clarify about the NAWK array to store multiple lines from huge file.
The file is having an unique REF.NO, I wants to store the lines (it may be
100+ lines) till I found the new REF.NO.

How can I apply NAWK - arrays for the above?

Rgds,
sharif.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete lines from huge file

I have to delete 1st 7000 lines of a file which is 12GB large. As it is so large, i can't open in vi and delete these lines. Also I found one post here which gave solution using perl, but I don't have perl installed. Also some solutions were redirecting the o/p to a different file and renaming it.... (3 Replies)
Discussion started by: rahulrathod
3 Replies

2. UNIX for Dummies Questions & Answers

How to store the values in a file into an array

Hi, I do have a file and the contents are as follws: 10 20 30 40 50 Now I want to store those values into an array. How can be done this ?? (3 Replies)
Discussion started by: risshanth
3 Replies

3. Shell Programming and Scripting

Prase a file and store and result to an array

Dear all, I have a file having the following formats: ThreadFail=Web1=1234 ThreadFail=Web2=2345 ThreadFail=Web3=12 ConnectionFail=DB1=11 ConnectionFail=DB2=22 The number of lines will be different from every time . How can I parse the file and store the result to an a array inside... (6 Replies)
Discussion started by: youareapkman
6 Replies

4. UNIX for Dummies Questions & Answers

copy and paste certain many lines of huge file in linux

Dear All, I am working with windoes OS but remote a linux machine. I wonder the way to copy an paste some part of a huge file in linux machine. the contain of file like as follow: ... dump annealling all custom 10 anneal_*.dat id type x y z q timestep 0.02 run 200000 Memory... (2 Replies)
Discussion started by: ariesto
2 Replies

5. Shell Programming and Scripting

Most reliable way to store file contents in an array in bash

Hi Guys, I have a file which has numbers in it separated by newlines as follows: 1.113 1.456 0.556 0.021 -0.541 -0.444 I am using the following code to store these in an array in bash: FILE14=data.txt ARRAY14=(`awk '{print}' $FILE14`) (6 Replies)
Discussion started by: npatwardhan
6 Replies

6. Shell Programming and Scripting

Store all the passed arguments in an array and display the array

Hi I want to write a script which store all the parameters passed to the script into an array. Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD. I want to know how can I... (3 Replies)
Discussion started by: dgmm
3 Replies

7. UNIX for Advanced & Expert Users

In a huge file, Delete duplicate lines leaving unique lines

Hi All, I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space. I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies

8. Shell Programming and Scripting

how to split a huge file by every 100 lines

into small files. i need to add a head.txt and tail.txt into small files at the begin and end, and give a name as q1.xml q2.xml q3.xml .... thank you very much. (2 Replies)
Discussion started by: dtdt
2 Replies

9. Shell Programming and Scripting

splitting a huge line of file into multiple lines with fixed number of columns

Hi, I have a huge file with a single line. But I want to break that line into lines of with each line having five columns. My file is like this: code: "hi","there","how","are","you?","It","was","great","working","with","you.","hope","to","work","you." I want it like this: code:... (1 Reply)
Discussion started by: rajsharma
1 Replies

10. Shell Programming and Scripting

Store values from a file into an array variable in Shell

Dear All, I have been trying to do a simple task of extracting 2 fields from the file (3 rows) and store it in an array variable. I tried with: #! /bin/bash ch=`cut -f10 tmp.txt` counter=0 for p in $pid do c=${ch} echo "$c ..$counter" counter=$((counter+1))... (2 Replies)
Discussion started by: ezhil01
2 Replies
xcb_poly_line(3)						   XCB Requests 						  xcb_poly_line(3)

NAME
xcb_poly_line - draw lines SYNOPSIS
#include <xcb/xproto.h> Request function xcb_void_cookie_t xcb_poly_line(xcb_connection_t *conn, uint8_t coordinate_mode, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t points_len, const xcb_point_t *points); REQUEST ARGUMENTS
conn The XCB connection to X11. coordinate_mode One of the following values: XCB_COORD_MODE_ORIGIN Treats all coordinates as relative to the origin. XCB_COORD_MODE_PREVIOUS Treats all coordinates after the first as relative to the previous coordinate. drawable The drawable to draw the line(s) on. gc The graphics context to use. points_len The number of xcb_point_t structures in points. points An array of points. DESCRIPTION
Draws points_len-1 lines between each pair of points (point[i], point[i+1]) in the points array. The lines are drawn in the order listed in the array. They join correctly at all intermediate points, and if the first and last points coincide, the first and last lines also join correctly. For any given line, a pixel is not drawn more than once. If thin (zero line-width) lines intersect, the intersecting pixels are drawn multiple times. If wide lines intersect, the intersecting pixels are drawn only once, as though the entire request were a single, filled shape. RETURN VALUE
Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop. If you want to handle errors directly with xcb_request_check instead, use xcb_poly_line_checked. See xcb-requests(3) for details. ERRORS
xcb_drawable_error_t TODO: reasons? xcb_gc_error_t TODO: reasons? xcb_value_error_t TODO: reasons? xcb_match_error_t TODO: reasons? EXAMPLE
/* * Draw a straight line. * */ void my_example(xcb_connection *conn, xcb_drawable_t drawable, xcb_gcontext_t gc) { xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, drawable, gc, 2, (xcb_point_t[]) { {10, 10}, {100, 10} }); xcb_flush(conn); } SEE ALSO
xcb-requests(3), xcb-examples(3) AUTHOR
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_poly_line(3)
All times are GMT -4. The time now is 11:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy