ya but i want only 4 lines from tag :7023: to next :.
all the lines after line number 4 should get delete till the next tag start i.e., :
so i want the output as
Last edited by Don Cragun; 10-24-2013 at 11:14 AM..
Reason: Add CODE tags.
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
I have a file that will sometimes contain a pattern. The pattern is this:
W/D FRM CHK 00
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (1 Reply)
I have a file that will sometimes contain a pattern. The pattern is this:
FRM CHK 0000
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (4 Replies)
I am trying to delete the line with pattern and the next line. Found the below command in forum which also deleted the previous line. how should i modify that to make sure that only the line with pattern and the next line are deleted but not the previous line?
awk '/key... (1 Reply)
Hi,
Before insert, delete everything. If ' available before insert, then we need to keep this.
Input:
====
l_s := ' INSERT INTO TEST1'
INSERT INTO TEST2
Output:
====
'INSERT INTO TEST'
INSERT INTO TEST2 (2 Replies)
if the given pattern exists in the file with the very next line starting and ending
with the same pattern , delete the line that starts and ends with the given pattern.
So upon running on this file
=====================
hai people<PATTERN> we had
<PATTERN>a lot of fun<PATTERN>
... (1 Reply)
How to delete the next lines of the below pattern matches a certain criteria using sed
it is rainy heavily<name>
<name> how is it there <name>
gfhafje
qwfwfqw
eeqewqrt
<name>
there is heavy raining <name>
so that the output will be
it is rainy heavily<name>
gfhafje
qwfwfqw... (2 Replies)
Hi all,
I'm trying to delete line contains pattern from file using ex editor
I have tried something like this
user@host ~ $/usr/bin/echo "/$pattern/d\nwq!"| /usr/bin/ex -s file.txt
This line is from script
but it doesn't work
any idea (4 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
LEARN ABOUT REDHAT
nl
NL(1) FSF NL(1)NAME
nl - number lines of files
SYNOPSIS
nl [OPTION]... [FILE]...
DESCRIPTION
Write each FILE to standard output, with line numbers added. With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-b, --body-numbering=STYLE
use STYLE for numbering body lines
-d, --section-delimiter=CC
use CC for separating logical pages
-f, --footer-numbering=STYLE
use STYLE for numbering footer lines
-h, --header-numbering=STYLE
use STYLE for numbering header lines
-i, --page-increment=NUMBER
line number increment at each line
-l, --join-blank-lines=NUMBER
group of NUMBER empty lines counted as one
-n, --number-format=FORMAT
insert line numbers according to FORMAT
-p, --no-renumber
do not reset line numbers at logical pages
-s, --number-separator=STRING
add STRING after (possible) line number
-v, --first-page=NUMBER
first line number on each logical page
-w, --number-width=NUMBER
use NUMBER columns for line numbers
--help display this help and exit
--version
output version information and exit
By default, selects -v1 -i1 -l1 -sTAB -w6 -nrn -hn -bt -fn. CC are two delimiter characters for separating logical pages, a missing second
character implies :. Type \ for . STYLE is one of:
a number all lines
t number only nonempty lines
n number no lines
pREGEXP
number only lines that contain a match for REGEXP
FORMAT is one of:
ln left justified, no leading zeros
rn right justified, no leading zeros
rz right justified, leading zeros
AUTHOR
Written by Scott Bartram and David MacKenzie.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for nl is maintained as a Texinfo manual. If the info and nl programs are properly installed at your site, the com-
mand
info nl
should give you access to the complete manual.
nl (coreutils) 4.5.3 February 2003 NL(1)