hi guys,
I want to do pattern matching with awk or sed but I don't know how. here's what I want:
I have a line number for a pattern that I have already found using grep, and I know a pattern like "---" that happens a few lines above that certain line number. I want to print out the chunk... (1 Reply)
I want to print between the range two patterns if a particular pattern is present in between the two patterns. I am new to Unix. Any help would be greatly appreciated.
e.g.
Pattern1
Bombay
Calcutta
Delhi
Pattern2
Pattern1
Patna
Madras
Gwalior
Delhi
Pattern2
Pattern1... (2 Replies)
All
i am struggling to raplace some text in a line between two (closest) patterns ,
line="/home/usr/bin/:/home/usr/devuser,n1.9/bin:/home/usr/root/bin"
i want to replace "devuser,n1.9" with "NEWVAL", basically all teh text from "devuser" until nearest '/' with some new text.
i tried teh... (1 Reply)
out of a range of numbers, how can i pick out the number that is the closest to any arbitrary/random number that a user supplies?
say the range of numbers are between 1 - 90000. but that doesn't mean each number exist between 1 - 90000. the range of numbers could be for example:
1, 3, 4, 6,... (6 Replies)
Hi
I have a problem in using awk in GAMS. I have to copy a part of a .txt file selecting the rows between these two lines
"0 / END OF TRANSFORMER DATA, BEGIN AREA DATA"
"0 / END OF AREA DATA, BEGIN TWO-TERMINAL DC DATA"
I thought of using a command like this:
$onecho > area.awk... (4 Replies)
Hi all,
I have a large matrix of 720 x 25. I want to get sum of range of rows and columns. Like, I need sum of all columns and row number 2 to 21, then leaving 22nd row, again sum of all columns and row number 23 to 42 again leaving 43rd row and then sum of 44th to 63. Means I want to add all... (4 Replies)
Hello, I have a file with nearly 57K lines. I want to filter the lines based on the range of values in a column. For e.g. print lines whose 3rd filed is >=0.02.
Input file:
LOC_Os09g32030 LOC_Os02g18880 0.0200037219149773 undirected NA NA
LOC_Os03g58630 LOC_Os09g35690 ... (1 Reply)
I'm trying to find a way to concatenate consecutive rows (key is column $1 and $2) if column $5 an $6 are integers and redefine ranges in columns $3&$4 and $5&$6
Unfortunately I'm still learning the very basics so I cannot figure a way of doing this with awk.
Input file
15 30 21 21 25.0... (11 Replies)
Hi all,
I have been searching all over Google but I am unable to find a solution for a particular result that I am trying to achieve.
Consider the following input:
1
2
3
4
5
B4Srt1--Variable-0000
B4Srt2--Variable-1111
Srt
6
7
8
9
10
End (3 Replies)
Discussion started by: y2jacky
3 Replies
LEARN ABOUT DEBIAN
distrib.pats
DISTRIB.PATS(5) File Formats Manual DISTRIB.PATS(5)NAME
distrib.pats - default values for Usenet Distribution header
DESCRIPTION
The file /etc/news/distrib.pats is used to determine the default value of the Distribution header. It consists of a series of lines; blank
lines and lines beginning with a number sign (``#'') are ignored. All other lines consist of three fields separated by a colon:
weight:pattern:value
The first field is the weight to assign to this match. If a newsgroup matches multiple lines, the line with the heighest weight is used.
This should be an arbitrary number greater than zero. Unlike other INN files, the order of lines in this file is not important.
The second field is the name of the newsgroup or a wildmat(3)-style pattern to specify a set of newsgroups. Multiple patterns are not
allowed.
The third field is the value that should be used if this line is picked as the best match. It can be an empty string.
Programs such as inews(1) that process a user's posting should consult this file, typically by using the DDxxx routines, documented in lib-
inn(3). The intent is that all newsgroups to which an article is posted be used to index into this file, and the value with the highest
weight should be used as the value of the Distribution header, if none was specified.
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.7, dated 1996/09/06.
SEE ALSO inews(1), libinn(3).
DISTRIB.PATS(5)