Hi users
I have one file which has number of occurrence of one pattern
examples
Adjustmenttype,11
xyz 10
dwe 9
abd 13
def 14
Adjustmenttype,11
xyz 24
dwe 34
abd 35
def 11
nmb 12
Adjustmenttype, not eleven
....
...
... (2 Replies)
Hi Guys,
I have file like below, I want to print all lines between test1231233 to its 10 occurrence(till line 41)
test1231233
qwe
qwe
qweq123
test1231233
qwe
qwe
qweq23
test1231233
qwe
qwe
qweq123
test1231233
qwe
qwe
qweq123131 (3 Replies)
I need to print out sections (varying numbers of lines) of a file between patterns. That alone is easy enough: sed -n '/START/,/STOP/' I also need the 3 lines BEFORE the start pattern. That alone is easy enough: grep -B3 START But I can't seem to combine the two so that I get everything between the... (2 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)
Hi,
I want to print only lines (green-italic lines) in between first and last strings in column 9.
there are different number of lines between each strings.
10 AUGUSTUS exon 4558 4669 . - . 10.g1
10 AUGUSTUS exon 8771 8889 . ... (6 Replies)
Hi Gurus,
I have a requirement where I need to display all lines between 2 patterns except the line where the first pattern in it. I tried the following command using awk but it is printing all lines except the lines where the 2 patterns exist.
awk '/TRANSF_/{ P=1; next } /Busy/ {exit} P'... (9 Replies)
Hello experts,
I have a text file from which I need to print all the lines between the patterns.
Could anyone please help me with the perl script.
names.txt
=========
Badger
Bald Eagle
Bandicoot
Bangle Tiger
Barnacle
Barracuda
Basilisk
Bass
Basset Hound
Beetle
Beluga... (7 Replies)
Hi,
i have been trying to extract multiple lines based on two different patterns as below:-
file1
@jkm|kdo|aas012|192.2.3.1 blablbalablablkabblablabla
sjfdsakfjladfjefhaghfagfkafagkjsghfalhfk
fhajkhfadjkhfalhflaffajkgfajkghfajkhgfkf
jahfjkhflkhalfdhfwearhahfl
@jkm|sdf|wud08q|168.2.1.3... (8 Replies)
Hello,
I need to print some lines as explained below,
TXT example
1111
2222
3333
4444
5555
6666
7777
8888
6666
9999
1111
2222
3333
4444
5555 (8 Replies)
I have a file similar to the below. I am selecting only the paragraphs with @inlineifset.
I am using the following command
sed '/@inlineifset/,/^ *$/!d;
s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln
This produces
@section Correlations between
seismograms,,,,}}
... (5 Replies)
Discussion started by: Danette
5 Replies
LEARN ABOUT REDHAT
msggrep
MSGGREP(1) GNU MSGGREP(1)NAME
msggrep - pattern matching on message catalog
SYNOPSIS
msggrep [OPTION] [INPUTFILE]
DESCRIPTION
Extracts all messages of a translation catalog that match a given pattern or belong to some given source files.
Mandatory arguments to long options are mandatory for short options too.
Input file location:
INPUTFILE
input PO file
-D, --directory=DIRECTORY
add DIRECTORY to list for input files search
If no input file is given or if it is -, standard input is read.
Output file location:
-o, --output-file=FILE
write output to specified file
The results are written to standard output if no output file is specified or if it is -.
Message selection:
[-N SOURCEFILE]... [-M DOMAINNAME]... [-K MSGID-PATTERN] [-T MSGSTR-PATTERN] [-C COMMENT-PATTERN]
A message is selected if it comes from one of the specified source files, or if it comes from one of the specified domains, or if -K is
given and its key (msgid or msgid_plural) matches MSGID-PATTERN, or if -T is given and its translation (msgstr) matches MSGSTR-PATTERN, or
if -C is given and the translator's comment matches COMMENT-PATTERN.
When more than one selection criterion is specified, the set of selected messages is the union of the selected messages of each criterion.
MSGID-PATTERN or MSGSTR-PATTERN syntax:
[-E | -F] [-e PATTERN | -f FILE]...
PATTERNs are basic regular expressions by default, or extended regular expressions if -E is given, or fixed strings if -F is given.
-N, --location=SOURCEFILE
select messages extracted from SOURCEFILE
-M, --domain=DOMAINNAME
select messages belonging to domain DOMAINNAME
-K, --msgid
start of patterns for the msgid
-T, --msgstr
start of patterns for the msgstr
-E, --extended-regexp
PATTERN is an extended regular expression
-F, --fixed-strings
PATTERN is a set of newline-separated strings
-e, --regexp=PATTERN
use PATTERN as a regular expression
-f, --file=FILE
obtain PATTERN from FILE
-i, --ignore-case
ignore case distinctions
Output details:
--no-escape
do not use C escapes in output (default)
--escape
use C escapes in output, no extended chars
--force-po
write PO file even if empty
--indent
indented output style
--no-location
suppress '#: filename:line' lines
--add-location
preserve '#: filename:line' lines (default)
--strict
strict Uniforum output style
-w, --width=NUMBER
set output page width
--no-wrap
do not break long message lines, longer than the output page width, into several lines
--sort-output
generate sorted output
--sort-by-file
sort output by file location
Informative output:
-h, --help
display this help and exit
-V, --version
output version information and exit
AUTHOR
Written by Bruno Haible.
REPORTING BUGS
Report bugs to <bug-gnu-gettext@gnu.org>.
COPYRIGHT
Copyright (C) 2001-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 msggrep is maintained as a Texinfo manual. If the info and msggrep programs are properly installed at your
site, the command
info msggrep
should give you access to the complete manual.
GNU gettext 0.11.4 July 2002 MSGGREP(1)