I have a file which has some lines starting with a particular word. I would like to delete 5 lines before each such line containing that particular word.
eg:
line1
line2
line3
line4
line5
line6
"particular word"...
I would like to delete line2-line6 and all such occurences in that... (4 Replies)
Hello,
I need to select the 3 lines above as well as below a search string, including the search string.
I have been trying various combinations using sed command without any success.
Can anuone help please.
Thanking (2 Replies)
I need help on following script:
I need to print the lines which are in bold letters in separate file as
record
string("|") emp_name;
string("|") emp_id;
decimal("|") emp_salary;
string("|") emp_status;
string("\n") emp_proj;
end (1 Reply)
Hello experts,
I am new to this group and to 'SED' and 'AWK'. I have data (text file) with 5 columns (C_1-5) and 100s of lines (only 10 lines are shown below as an example). I have to find or select only the id numbers (C-1) of specific lines with '90' in the same line (of C_3) AND with '20' in... (6 Replies)
Hi,
I'am working under unix solaris
I have a text file with set of lines, each set of lines (BLOCK) have
three fixed lines :
Between SECND line and THEND we have N lines, N differ from a block to another
sample :
i have to make a script wich delete each 3 fixed lines if N=0... (3 Replies)
I want to delete all lines from a file (orig_file) that contain the regex values (bad_inv_list)
I tried a for each loop with sed but it isn't working
for file in `cat bad_inv_list`;
do
sed '/$file/d' orig_file > pared_down_file.1
mv pared_down_file.1 orig_file
done
I've added... (2 Replies)
Hello,
I have a file filled with dates, such as:
04-08-2011 message
04-08-2011 message
03-08-2011 message
01-08-2011 message
31-07-2011 message
24-07-2011 message
15-07-2011 message
13-12-2008 message
26-11-2007 message
And I want to delete those lines whose date is older than 10... (5 Replies)
hi
i have a set of similar files. i want to delete lines until certain pattern appears in those files. for a single file the following command can be used but i want to do it for all the files at a time since the number is in thousands.
awk '/PATTERN/{i++}i' file (6 Replies)
Discussion started by: anurupa777
6 Replies
LEARN ABOUT SUSE
tk_getatomname
Tk_InternAtom(3) Tk Library Procedures Tk_InternAtom(3)__________________________________________________________________________________________________________________________________________________NAME
Tk_InternAtom, Tk_GetAtomName - manage cache of X atoms
SYNOPSIS
#include <tk.h>
Atom
Tk_InternAtom(tkwin, name)
const char *
Tk_GetAtomName(tkwin, atom)
ARGUMENTS
Tk_Window tkwin (in) Token for window. Used to map atom or name relative to a particular display.
const char *name (in) String name for which atom is desired.
Atom atom (in) Atom for which corresponding string name is desired.
_________________________________________________________________DESCRIPTION
These procedures are similar to the Xlib procedures XInternAtom and XGetAtomName. Tk_InternAtom returns the atom identifier associated
with string given by name; the atom identifier is only valid for the display associated with tkwin. Tk_GetAtomName returns the string
associated with atom on tkwin's display. The string returned by Tk_GetAtomName is in Tk's storage: the caller need not free this space
when finished with the string, and the caller should not modify the contents of the returned string. If there is no atom atom on tkwin's
display, then Tk_GetAtomName returns the string "?bad atom?".
Tk caches the information returned by Tk_InternAtom and Tk_GetAtomName so that future calls for the same information can be serviced from
the cache without contacting the server. Thus Tk_InternAtom and Tk_GetAtomName are generally much faster than their Xlib counterparts, and
they should be used in place of the Xlib procedures.
KEYWORDS
atom, cache, display
TkTk_InternAtom(3)