Hey guys, Can sed or another command be used to examine a path such as
/home/test/blah/blahand check to see if the last character is a "/" and if so remove it
So this is what should happen:
/home/test/blah/blahnothing happens, this is ok
/home/test/blah/blah/the "/" at the end is... (6 Replies)
Hi All,
How to remove a box like special character which appears at the end of a string/line/record. I have no clue what this box like special character is. It is transparent square like box. This appears in a .DAT file at the end of header.
I'm to compare a value in header with a parameter.... (16 Replies)
Hi
i had String like
UID: ABC345QWE678GFK345SA90, LENGTH 32
when I used awk ' FS, {print $1}' prints
ABC345QWE678GFK345SA90,
how can i getrid of that coma at the end of the string.
Thanks in advance.. (14 Replies)
Hi Experts,
Here is what I am trying to do.
1) say I have a file with below strings
database1
database2
database3
data10gdb1
data10gdb2
databasewithoutdigit
2) I want to get the below output.
(- if there is any digit at the end of the string, I need to remove it)
(- Any... (3 Replies)
Suppose, I have a variable var=" name is ".
I want to remove the blank spaces from the begining and endonly, not from the entire string.
So, that the variable/string looks like following
var="name is".
Please look after the issue. (3 Replies)
Hi,
I hope someone can share there scripting fu on my problem,
I would like to delete the 3rd character from a random length of string starting from the end
Example
Output
Hope you can help me..
Thanks in advance.. (3 Replies)
Hi,
I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
How can I extract digits at the end of a string in UNIX shell scripting or perl?
cat file.txt
abc_d123_4567.txt
A246_B789.txt
B123cc099.txt
a123_B234-012.txt
a13.txt
What can I do here? Many thanks.
cat file.txt | sed "s/.txt$//" | ........
4567
789
099
012
13 (11 Replies)
Discussion started by: mingch
11 Replies
LEARN ABOUT CENTOS
xiselectevents
XISELECTEVENTS(3)XISELECTEVENTS(3)NAME
XISelectEvents, XIGetSelectedEvents - select for or get selected XI2 events on the window.
SYNOPSIS
#include <X11/extensions/XInput2.h>
Status XISelectEvents( Display *display,
Window win,
XIEventMask *masks,
int num_masks);
display
Specifies the connection to the X server.
masks
Device event mask.
num_masks
Number of masks in masks.
win
Specifies the window.
XIEventMask *XIGetSelectedEvents( Display *display,
Window win,
int *num_masks_return);
display
Specifies the connection to the X server.
num_masks_return
Number of masks in the return value.
win
Specifies the window.
DESCRIPTION
XI2 events must be selected using XISelectEvents.
XISelectEvents sets the event mask for this client on win.
Further events are only reported to this client if the event
type matches the selected event mask. The masks overrides the
previously selected event mask for the given device.
If deviceid is a valid device, the event mask is selected only
for this device. If deviceid is XIAllDevices or
XIAllMasterDevices, the event mask is selected for all devices
or all master devices, respectively. The effective event mask
is the bit-wise OR of the XIAllDevices, XIAllMasterDevices and
the respective device's event mask.
typedef struct {
int deviceid;
int mask_len;
unsigned char* mask;
} XIEventMask;
The mask_len specifies the length of mask in bytes. mask is a
binary mask in the form of (1 << event type). deviceid must be
either a device or XIAllDevices or XIAllMasterDevices. A client
may submit several masks with the same deviceid in one request
but only the last mask will be effective.
XISelectEvents can generate a BadValue, a BadDevice, and a
BadWindow error.
XIGetSelectedEvents returns the events selected by this client on the given
window. If no events were selected on this window, XIGetSelectedEvents
returns NULL and num_masks_return is set to 0. If an internal error occurs,
XIGetSelectedEvents returns NULL and num_masks_return is set to -1.
Otherwise, XIGetSelectedEvent returns the selected event masks for all
devices including the masks for XIAllDevices and XIAllMasterDevices
The caller must free the returned data using XFree().
DIAGNOSTICS
BadValue
A value is outside of the permitted range.
BadWindow
A value for a Window argument does not name a defined
window.
BadDevice
An invalid device was specified. The device does not
exist.
03/09/2013 XISELECTEVENTS(3)