Sponsored Content
Top Forums Shell Programming and Scripting help with script to send email and if subject line match is found Post 302435558 by jgt on Wednesday 7th of July 2010 04:21:45 PM
Old 07-07-2010
How is the script to know which events have already been reported?
The back slashes in the data could also be problematic.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

if match found go to a particular line in perl

Hello Experts, I am newbie to perl, just curious to know how to do the following in perl. suppose I ve a txt file like below. when it founds "*Main Start" Then go to "*Main End,,,,,,,," patteren and just collect the number from the previous line of "*Main End,,,,,,," pattern . In my... (17 Replies)
Discussion started by: user_prady
17 Replies

2. Shell Programming and Scripting

Run a script based on the subject line of the email

Hi, I need help in running a script that would pull info from an email subject line and run a script (foo.sh). I'm pretty sure after a bit of googling that this is possible in several ways. but none was pretty clear on how to accomplish it. The part that I really need help with is getting the... (5 Replies)
Discussion started by: satekn
5 Replies

3. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

4. Shell Programming and Scripting

How to read specific line of text from a Script and send email notification

Hi ! I am a newbie and never officially wrote a shell script before. The requirement for this script is : 1) Read a file called 'bpm.log' and identify if it has a specific text such as 'this is the text'. Its a static value and that is the only text we need to read. 2) If that... (2 Replies)
Discussion started by: atechcorp
2 Replies

5. UNIX for Dummies Questions & Answers

Display n lines after match found and other line

I have a file like this DoctorName Address1 Address2 DOB InsuredName Address1 Address2 DOB PatientName Address1 Address2 DOB ClaimNo1 DoctorName Address1 Address2 DOB InsuredName (2 Replies)
Discussion started by: nsuresh316
2 Replies

6. Shell Programming and Scripting

Displaying text till pattern match found in a line

Hi All, From the below line if we want to display all the text till found pattern dot/. I was trying with the below code but couldn't able to print text before the pattern. it display texts which is found after pattern. awk '/assed/{print;getline;print}' file_name | sed 's/^*. *//' input... (4 Replies)
Discussion started by: Optimus81
4 Replies

7. Shell Programming and Scripting

How to print the entire line if the mentioned match is found?

Hello Everyone, I have a file with 5 fields in each line just like mentioned below. Also the 4th field is time elapsed(hh:mm:ss) since the process is running xyz abc status 23:00:00 idle abc def status 24:00:00 idle def gji status 27:00:02 idle fgh gty status 00:00:00 idle Here I... (8 Replies)
Discussion started by: rahul2662
8 Replies

8. Shell Programming and Scripting

Sendemail how to send an email with a subject variable

Hi,:) I try this : #!/bin/bash sender="me@example.com" recipient="you@example.com" subject="TEST FILE" server="0.0.0.0" file=$(cat file.txt) /usr/bin/sendemail -f $sender -t $recipient -u $subject -m $file My file.txt: BLABLALA BLABLABLA (7 Replies)
Discussion started by: Arnaudh78
7 Replies

9. Shell Programming and Scripting

Add comment on last line if found match

Hi All, totally new on it , normally use it for just 1 line. i'm looking for help. i'm have 2 file. file 1 : -------------------------------------------------- c12 c1 c3 -------------------------------------------------- file 2: other content ... (10 Replies)
Discussion started by: kttan
10 Replies

10. UNIX for Beginners Questions & Answers

Modify text file if found multiple pattern match for every line.

Looking for help, i have input file like below and want to modify to expected output, if can without create additional file, hope can direct modify it. have 2 thing need do. 1st is adding a word (testplan generation off) after ! ! IPG: Tue Aug 07 14:31:17 2018 2nd is adding... (16 Replies)
Discussion started by: kttan
16 Replies
XGrabKeyboard() 														   XGrabKeyboard()

Name
  XGrabKeyboard - grab the keyboard.

Synopsis
  int XGrabKeyboard(display, grab_window, owner_events, pointer_mode,
	    keyboard_mode, time)
	Display *display;
	Window grab_window;
	Bool owner_events;
	int pointer_mode, keyboard_mode;
	Time time;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  grab_window
	    Specifies the ID of the window that requires continuous keyboard input.

  owner_events
	    Specifies a boolean value of either True or False.	See the "Description" section below.

  pointer_mode
	    Controls processing of pointer events during the grab.  Pass either GrabModeSync or GrabModeAsync.

  keyboard_mode
	    Controls processing of keyboard events during the grab.  Pass either GrabModeSync or GrabModeAsync.

  time	    Specifies the time when the grab should take place.  Pass either a timestamp, expressed in milliseconds, or the constant Current-
	    Time.

Returns
  GrabSuccess on success.  AlreadyGrabbed, GrabNotViewable, GrabInvalidTime, or GrabFrozen on failure.

Description
  XGrabKeyboard() actively grabs control of the main keyboard.	Further key events are reported only to the grabbing  client.	This  request
  generates FocusIn and FocusOut events.

  XGrabKeyboard() processing is controlled by the value in the owner_events argument:

  o  If owner_events is False, all generated key events are reported to grab_window.

  o  If  owner_events  is  True, then if a generated key event would normally be reported to this client, it is reported normally.  Otherwise
     the event is reported to grab_window.

  Both KeyPress and KeyRelease events are always reported, independent of any event selection made by the client.

  XGrabKeyboard() processing of pointer events and keyboard events are controlled by pointer_mode and keyboard_mode:

  o  If the pointer_mode or keyboard_mode is GrabModeAsync, event processing for the respective device continues normally.

  o  For keyboard_mode GrabModeAsync only: if the keyboard was currently frozen by  this  client,  then  processing  of  keyboard  events  is
     resumed.

  o  If  the  pointer_mode or keyboard_mode is GrabModeSync, events for the respective device are queued by the server until a releasing XAl-
     lowEvents() request occurs or until the keyboard grab is released as described above.

  If the grab is successful, XGrabKeyboard() returns the constant GrabSuccess.	XGrabKeyboard() fails  under  the  following  conditions  and
  returns the following:

  o  If the keyboard is actively grabbed by some other client, it returns AlreadyGrabbed.

  o  If grab_window is not viewable, it returns GrabNotViewable.

  o  If time is earlier than the last keyboard grab time or later than the current server time, it returns GrabInvalidTime.

  o  If the pointer is frozen by an active grab of another client, the request fails with a status GrabFrozen.

  If the grab succeeds, the last keyboard grab time is set to the specified time, with CurrentTime replaced by the current X server time.

  For more information on grabbing, see Volume One, Chapter 9, The Keyboard and Pointer.

Errors
  BadValue
  BadWindow

See Also
  XChangeActivePointerGrab(),  XGrabButton(),  XGrabKey(),  XGrabPointer(),  XGrabServer(), XUngrabButton(), XUngrabKey(), XUngrabKeyboard(),
  XUngrabPointer(), XUngrabServer().

Xlib - Grabbing 														   XGrabKeyboard()
All times are GMT -4. The time now is 01:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy