I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)
folks,
In my working directory, there a multiple large files which only contain one line in the file. The line is too long to use "grep", so any help?
For example, if I want to find if these files contain a string like "93849", what command I should use?
Also, there is oder_id number... (1 Reply)
I have this kind of file
ABC UUIIIIIIIIIIII ,
HJHKJKL
XYZ HHJJJJJJMMM
ABC BBOOIO,
PPLIOJK
XYZ NMJKJKK
ABC MMMM
ABC OPOPO
XYZ LLKLKLL
I need to get all data from ABC till XYZ
so output should be
UUIIIIIIIIIIII (6 Replies)
Hi,
I am trying to do the following:
grep -l <pattern> <files to be searched for>
In <files to be searched for> , all files should of some specific date like "Apr 8" not all files in current directory. I just to search within files Apr 8 files so that it won't search in entire list of... (2 Replies)
Hi,
Currently I am working on a script to automate the process of converting the log file from binary into text format. To achieve this, partly I am depending on my application’s utility for this conversion and the rest I am relying on shell commands to search for directory, locate the file and... (5 Replies)
I need to send email to receipient in each block of data in a file which has the sender address under TO and just send that block of data where it ends as COMPANY.
I tried to work this out by getting line numbers of the string HELLO but unable to grab the next block of data to send the next... (5 Replies)
To match range, the command is:
awk '/BEGIN/,/END/'
but what I want is the range is printed only if there is additional pattern that matches in the range itself? maybe like this:
awk '/BEGIN/,/END/ if only in that range there is /pattern/'
Thanks (8 Replies)
Hi all,
I'm new to the forum and also relatively new to sed and other such wonderfully epic tools.
I'm attempting to grab a section of text between two words, but it seems to match all instances of the range instead of stopping at just the first.
This occurs when I use:
sed -n... (7 Replies)
Input: START
OS:: UNIX
Release: xxx
Version: xxx
END
START
OS:: LINUX
Release: xxx
Version: xxx
END
START
OS:: Windows
Release: xxx
Version: xxx
ENDHere i am trying to get all the information between START and END, only if i could match OS Type.
I can get all the data between the... (3 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
LEARN ABOUT REDHAT
tk_ungrab
Tk_Grab(3) Tk Library Procedures Tk_Grab(3)__________________________________________________________________________________________________________________________________________________NAME
Tk_Grab, Tk_Ungrab - manipulate grab state in an application
SYNOPSIS
#include <tk.h>
int
Tk_Grab(interp, tkwin, grabGlobal)
void
Tk_Ungrab(tkwin)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting
Tk_Window tkwin (in) Window on whose behalf the pointer is to be grabbed or released
int grabGlobal (in) Boolean indicating whether the grab is global or application local
_________________________________________________________________DESCRIPTION
These functions are used to set or release a global or application local grab. When a grab is set on a particular window in a Tk applica-
tion, mouse and keyboard events can only be received by that window and its descendants. Mouse and keyboard events for windows outside the
tree rooted at tkwin will be redirected to tkwin. If the grab is global, then all mouse and keyboard events for windows outside the tree
rooted at tkwin (even those intended for windows in other applications) will be redirected to tkwin. If the grab is application local,
only mouse and keyboard events intended for a windows within the same application (but outside the tree rooted at tkwin) will be redi-
rected.
Tk_Grab sets a grab on a particular window. Tkwin specifies the window on whose behalf the pointer is to be grabbed. GrabGlobal indicates
whether the grab should be global or application local; if it is non-zero, it means the grab should be global. Normally, Tk_Grab returns
TCL_OK; if an error occurs and the grab cannot be set, TCL_ERROR is returned and an error message is left if interp's result. Once this
call completes successfully, no window outside the tree rooted at tkwin will receive pointer- or keyboard-related events until the next
call to Tk_Ungrab. If a previous grab was in effect within the application, then it is replaced with a new one.
Tcl_Ungrab releases a grab on the mouse pointer and keyboard, if there is one set on the window given by tkwin. Once a grab is released,
pointer and keyboard events will start being delivered to other windows again.
KEYWORDS
grab, window
TkTk_Grab(3)