Thank you very much guys for such a guidence....
It really helped..
Now this is deleting all the records in range of 250 or 250 chars
What is need is to delete records which are not in the range of 250 or 250 chars..using SED..
Last edited by Franklin52; 05-16-2011 at 05:01 AM..
Reason: Please use code tags
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line.
... (1 Reply)
hi all,
attached you can find a small txt file ( .txt ),
GIVEN that past_scheduler="islip" and scheduler="mucf"
can somebody please tell me
WHY sed 's/-u '$past_scheduler'/-u '$scheduler'/g' .txt > .txt.temp fails ?
thanx (3 Replies)
Hello,
Can any perl experts help me convert my sed string to perl. I am unsuccessful with this.
I have to remove this string from html files OAS_AD('Top');
I have come up with this. However the requirement is in perl.
for find in $(find . -type f -name "file1.html") ; do cat $find |... (2 Replies)
I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename?
#!/bin/bash
filename=`echo $0`
/usr/bin/sed '/#include/ {
i\
the filename is `$filename`
}' $1
exit 0 (8 Replies)
Hi.....
I'm using sed command for replace the words in a file
cat >test.txt
My test.txt contains
Mary had a little ham
Mary fried a lot of spam
Jack ate a Spam sandwich
Jill had a lamb spamwich
Marry had a spicy wich
$ sed 's/wich$/mirchi/g' test.txt
output is:
Mary had a little ham... (24 Replies)
Hello All,
I have something like below
LDC100/rel/prod/libinactrl.a
LAA2000/rel/prod/libinactrl.a
I want to remove till first forward slash that is outputshould be as below
rel/prod/libinactrl.a
rel/prod/libinactrl.a
How can I do that ??? (8 Replies)
Hello,
I'm working with this command which I'm having trouble understanding it:
sed -e '1,$ s/SUB/N/g' < $1 > file.txt
Where SUB stand for an special character with code in ASCII is 0x1A, notepad read it as a right arrow.
Any help will be appreciated. (5 Replies)
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Hi All,
I'm relatively new to Unix scripting and am trying to get my head around piping.
I'm trying to take a header record from one file and prepend it to another file. I've done this by creating several temp files but i'm wondering if there is a cleaner way to do this.
I'm thinking... (10 Replies)
Discussion started by: BigCroyd
10 Replies
LEARN ABOUT CENTOS
dmxgetwindowattributes
DMXGetWindowAttributes(3) Library Functions Manual DMXGetWindowAttributes(3)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(3) 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(3) 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(3) call that will
eventually map the window had been buffered by Xlib's normal buffering system. To avoid this race condition, please call DMXSync(3) before
communicating directly with the back-end X server.
SEE ALSO DMXGetScreenCount(3), DMXSync(3), DMXGetScreenAttributes(3), DMX(3), Xdmx(1)X Version 11 libdmx 1.1.3 DMXGetWindowAttributes(3)