08-22-2011
Deleting lines that contain a specific string from a space delimited text file?
Hi,
I have a space delimited text file that looks like the following:
250 rs10000056 0.04 0.0888 4 189321617
250 rs10000062 0.05 0.0435 4 5254744
250 rs10000064 0.02 0.2403 4 127809621
250 rs10000068 0.01 NA
250 rs1000007 0.00 0.9531 2 237752054
250 rs10000081 0.03 0.1400 4 17348363
250 rs10000085 0.01 0.3630 4 61435320
250 rs10000088 0.01 NA
250 rs10000092 0.00 0.8284 4 21895517
250 rs1000012 0.00 0.6633 9 135703041
250 rs10000121 0.00 0.6653 4 157574035
250 rs10000132 0.00 0.9437 4 7399669
I would like to remove all the lines that contain NA. How do I go about doing that? Thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need a little help...
I have a file with 3 fields,
Time/Date, IP address, UniqueID
I have a 2nd file of UniqueIDs.
I want to either (which ever is easier):
1. delete entries in file 1 that have a UniqueID in file 2
2. create a new file with the fields from File 1, excluding the... (4 Replies)
Discussion started by: goldie363
4 Replies
2. UNIX for Dummies Questions & Answers
I have a space delimited text file with 1,000,000+ columns and 100 rows. I want to delete columns 2 through 5 (2 and 5) included from the text file. How do I do that? Thanks. (3 Replies)
Discussion started by: evelibertine
3 Replies
3. UNIX for Dummies Questions & Answers
I have this space delimited large text file with more than 1,000,000+ columns and about 100 rows. I want to delete all the cells that consist of just 2 (leave 2's that are not by themselves intact):
File before modification
aa bb cc 2 NA100 dd
aa b1 c2 2 NA102 de
File after modification... (1 Reply)
Discussion started by: evelibertine
1 Replies
4. UNIX for Dummies Questions & Answers
I have a space delimited text file with 1,000,000+ columns? I would only like to view specific ones (let's say through 1:10), how can I do that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
5. UNIX for Dummies Questions & Answers
I have a tab limited text file with 10000+ columns. I want to delete columns 6 through 23, how do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
6. Shell Programming and Scripting
this is Korn shell unix.
The scenario is I have a pipe delimited text file which needs to be customized. say for example,I have a pipe delimited text file with 15 columns(| delimited) and 200 rows. currently the 11th and 12th column has null values for all the records(there are other null columns... (4 Replies)
Discussion started by: vasan2815
4 Replies
7. UNIX for Dummies Questions & Answers
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
Discussion started by: evelibertine
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
9. Shell Programming and Scripting
I'm trying to create a script.
There are 2 files - fileA.log & fileB.log
fileA.log has the below data :
aaaa
cccc
eeee
fileB.log has the below data :
cjahdskjah aaaa xyz
jhaskjdhas bbbb abc
ajdhjkh cccc abc
cjahdskjah ... (7 Replies)
Discussion started by: Pandee
7 Replies
10. Shell Programming and Scripting
Hi,
I'm trying to search for some number and from that line, i need to delete the 5th line exactly.
Eg:
Consider below as text file data:
10000
a
b
c
d
e
.
.
.
10000
w
q
t (8 Replies)
Discussion started by: Gautham
8 Replies
LEARN ABOUT XFREE86
dmxgetwindowattributes
DMXGetWindowAttributes(3X) DMXGetWindowAttributes(3X)
NAME
DMXGetWindowAttributes - determine back-end window attributes
SYNOPSIS
#include <X11/extensions/dmxext.h>
Bool DMXGetWindowAttributes(Display *dpy,
Window window,
int *screen_count,
int available_count,
DMXWindowAttributes *attr);
DESCRIPTION
When calling DMXGetWindowAttributes(), window specifies the window ID of a window on the Xdmx(1) server and available_count specifies the
length of attr.
The number of screens for which information is available will be returned in screen_count and information about those screen will be
returned in attr. If screen_count is less than available_count, then information for all of the screens will be returned. Otherwise,
information for the first available_count screens will be returned.
The DMXWindowAttributes structure is:
typedef struct {
int screen;
Window window;
XRectangle pos, vis;
} DMXWindowAttributes;
For each back-end X server that displays a portion of window, this structure contains the physical screen containing that portion, the win-
dow ID on the back-end X server of the window containing that portion, the position and dimensions of the window on the back-end (pos, in
screen coordinates), and the visible area of the window on the back-end (vis, in window-relative coordinates -- all zeros if the window is
not visible on the backend).
To obtain more information about the physical screen use the DMXGetScreenAttributes(3X) call.
Note that DMX allows multiple back-end windows to overlap in their view of the DMX logical window. Further, a logical window does not have
to be completely covered by back-end windows -- there may be gaps.
As an example, consider a 500x500 window that spans the top two 1024x768 back-end displays (A and B) of a 2048x1536 DMX display composed of
4 1024x768 back-end displays arranged in a cube:
A B
C D
In this case, the DMXGetWindowAttributes call would return the following information for the 500x500 window:
display A: 500x500 window at 1024-250,0 (relative to back end)
with 250x500 visible at 0,0 (relative to window origin)
display B: 500x500 window at -250,0 (relative to back end)
with 250x500 visible at 250,0 (relative to window origin)
display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0
display D: 500x500 window at -250,-768 with 0x0 visible at 0,0
RETURN VALUE
DMXGetWindowAttributes() returns True unless there is a protocol error.
DMXGetWindowAttributes() can generate BadWindow and BadAlloc errors.
NOTES
Because this call transports a great deal of information over the wire, please call DMXGetScreenCount(3X) first, and make sure attr is suf-
ficiently large.
On a particular back-end server, it is possible that the associated window has not yet been mapped because the XMapWindow(3X) call that
will eventually map the window had been buffered by Xlib's normal buffering system. To avoid this race condition, please call DMXSync(3X)
before communicating directly with the back-end X server.
SEE ALSO
DMXGetScreenCount(3X), DMXSync(3X), DMXGetScreenAttributes(3X), DMX(3X), Xdmx(1)
XFree86 Version 4.7.0 DMXGetWindowAttributes(3X)