02-20-2010
Yes. If you need more help please post sample input data and an example of the desired output.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT HPUX
xdrawlines
XDrawLines() XDrawLines()
Name
XDrawLines - draw multiple connected lines.
Synopsis
XDrawLines(display, drawable, gc, points, npoints, mode)
Display *display;
Drawable drawable;
GC gc;
XPoint *points;
int npoints;
int mode;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
drawable Specifies the drawable.
gc Specifies the graphics context.
points Specifies a pointer to an array of points.
npoints Specifies the number of points in the array.
mode Specifies the coordinate mode. Pass either CoordModeOrigin or CoordModePrevious.
Description
XDrawLines() draws a series of lines joined end-to-end.
It draws lines connecting each point in the list (points array) to the next point in the list. The lines are drawn in the order listed in
the points array. For any given line, no pixel is drawn more than once. If thin (zero line width) lines intersect, pixels will be drawn
multiple times. If the first and last points coincide, the first and last lines will join correctly. If wide lines intersect, the inter-
secting pixels are drawn only once, as though the entire multiline request were a single filled shape.
There is a limit to the number of lines that can be drawn in a single call, which varies according to the server. To determine how many
lines you can draw in a single call, find out your server's maximum request size using XMaxRequestSize(). Subtract three and divide by
two, and this is the maximum number of lines you can draw in a single XDrawLines() call.
The mode argument may have two values:
o CoordModeOrigin indicates that all points are relative to the drawable's origin.
o CoordModePrevious indicates that all points after the first are relative to the previous point. (The first point is always relative to
the drawable's origin.)
XDrawLines() uses the following components of the specified graphics context to draw multiple connected lines in the specified drawable:
function, plane_mask, line_width, line_style, cap_style, join_style, fill_style, subwindow_mode, clip_x_origin, clip_y_ origin, and
clip_mask. This function also uses these graphics context mode-dependent components: foreground, background, tile, stipple, ts_x_origin,
ts_y_origin, dash_offset, and dashes.
For more information, see Volume One, Chapter 6, Drawing Graphics and Text, and Chapter 5, The Graphics Context.
Structures
typedef struct {
short x, y;
} XPoint;
Errors
BadDrawable
Specified drawable is invalid.
BadGC Specified GC is invalid, or does not match the depth of drawable.
BadMatch Specified drawable is an InputOnly window.
BadValue Invalid coordinate_mode.
See Also
XClearArea(), XClearWindow(), XCopyArea(), XCopyPlane(), XDraw, XDrawArc(), XDrawArcs(), XDrawFilled(), XDrawLine(), XDrawPoint(), XDraw-
Points(), XDrawRectangle(), XDrawRectangles(), XDrawSegments(), XFillArc(), XFillArcs(), XFillPolygon(), XFillRectangle(), XFillRectan-
gles().
Xlib - Drawing Primitives XDrawLines()