01-25-2007
displaying range of columns
can i display range of columns in AWk...
say in cut command i can display columnm 2-13....
is there is any simmilar command in awk
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i having problems figuring out how to 'read' in 3 different directory listings and then display them on the screen into 3 separate columns.
i thought i could use a 'for' loop to grab each directory and then assign a unique variable to each line 'read' in.
of course, as you experts all know,... (16 Replies)
Discussion started by: mjays
16 Replies
2. Shell Programming and Scripting
I'm writing a script to analyze the logs of an smtp relay machine and I'd like the final output to be displayed in columns showing results from the previous day, week, month, and 45 days. The problem I'm running into is that I can't figure out how to display the columns neatly so there is no... (1 Reply)
Discussion started by: jjamd64
1 Replies
3. UNIX for Dummies Questions & Answers
Hi, I'm just wondering how you display a specific set of columns of a specified file in Unix. For example, if you had an AddressBook file that stores the Names, Phone numbers, and Addresses of people the user entered in the following format (the numbers are just to give an idea of what column... (1 Reply)
Discussion started by: logorob
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a query about joining files using data ranges.
Example files below - I want to join file1 to file2 with matches where file1 column 1 is equal to file2 column1, and file1 column 2 is within the range of file2 columns 3 and 4. I would like rows which don't match to be printed too.
... (4 Replies)
Discussion started by: auburn
4 Replies
5. Shell Programming and Scripting
I have a huge matrix file which looks like this (example matrix):
1 2 3 5
4 5 6 7
7 6 8 9
1 2 4 2
7 6 5 1
3 2 1 9
As one can see, this matrix has 4 columns and 6 rows. But my original matrix has some 3 million rows and 6000 columns.
For example, on this matrix I can define my task as... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
6. UNIX for Dummies Questions & Answers
Hello all,
I have a .csv file with over 100 columns. I would like to grep for a pattern only searching within a range of those fields, and print the entire line. For example: grep a pattern from columns $47-$87, but print fields $0 - $100
Thanks! (9 Replies)
Discussion started by: torchij
9 Replies
7. Shell Programming and Scripting
Hello,
I have a huge file with many columns . I want to use the names of the columns to print columns to another file.
for example
file.txt
COLA COLB COLC COLD
1 2 3 5
3 5 6 9
If I give name for multiple columns to the code:... (5 Replies)
Discussion started by: ryan9011
5 Replies
8. Shell Programming and Scripting
Hi all,
I have a large matrix of 720 x 25. I want to get sum of range of rows and columns. Like, I need sum of all columns and row number 2 to 21, then leaving 22nd row, again sum of all columns and row number 23 to 42 again leaving 43rd row and then sum of 44th to 63. Means I want to add all... (4 Replies)
Discussion started by: CAch
4 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I am new to shell scripting. I have a requirement as part of my job to find out null/empty values in column 2 and column 3 from a CSV file and exit the further execution of script by displaying a simple error message.
I have developed a script to do this by reading various articles... (7 Replies)
Discussion started by: tpk
7 Replies
10. UNIX for Beginners Questions & Answers
Hi there,
I am trying to remove al letters after : character on specific columns from 10th column till 827. I used sed and cut to do so but I am sure there is better one liner someone can think of from unix community members.
Huge file but it has this structure (Total number of Columns =... (10 Replies)
Discussion started by: daashti
10 Replies
LEARN ABOUT ULTRIX
xfetchbytes
XStoreBytes(3X11) MIT X11R4 XStoreBytes(3X11)
Name
XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer, XRotateBuffers - manipulate cut and paste buffers
Syntax
XStoreBytes(display, bytes, nbytes)
Display *display;
char *bytes;
int nbytes;
XStoreBuffer(display, bytes, nbytes, buffer)
Display *display;
char *bytes;
int nbytes;
int buffer;
char *XFetchBytes(display, nbytes_return)
Display *display;
int *nbytes_return;
char *XFetchBuffer(display, nbytes_return, buffer)
Display *display;
int *nbytes_return;
int buffer;
XRotateBuffers(display, rotate)
Display *display;
int rotate;
Arguments
buffer Specifies the buffer in which you want to store the bytes or from which you want the stored data returned.
bytes Specifies the bytes, which are not necessarily ASCII or null-terminated.
display Specifies the connection to the X server.
nbytes Specifies the number of bytes to be stored.
nbytes_return
Returns the number of bytes in the buffer.
rotate Specifies how much to rotate the cut buffers.
Description
Note that the cut buffer's contents need not be text, so zero bytes are not special. The cut buffer's contents can be retrieved later by
any client calling
can generate a error.
If the property for the buffer has never been created, a error results.
can generate and errors.
The function returns the number of bytes in the nbytes_return argument, if the buffer contains data. Otherwise, the function returns NULL
and sets nbytes to 0. The appropriate amount of storage is allocated and the pointer returned. The client must free this storage when
finished with it by calling Note that the cut buffer does not necessarily contain text, so it may contain embedded zero bytes and may not
terminate with a null byte.
The function returns zero to the nbytes_return argument if there is no data in the buffer.
can generate a error.
The function rotates the cut buffers, such that buffer 0 becomes buffer n, buffer 1 becomes n + 1 mod 8, and so on. This cut buffer num-
bering is global to the display. Note that generates errors if any of the eight buffers have not been created.
can generate a error.
Diagnostics
The server failed to allocate the requested resource or server memory.
A value for an Atom argument does not name a defined Atom.
Some argument or pair of arguments has the correct type and range but fails
to match in some other way required by the request.
Some numeric value falls outside the range of values accepted by the request.
Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument
defined as a set of alternatives can generate this error.
See Also
XFree(3X11)
X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys
XStoreBytes(3X11)