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)
Hi,
My input has much more lines, but few of them are below
pin(IDF) {
direction : input;
drc_pinsigtype : signal;
pin(SELDIV6) {
direction : input;
drc_pinsigtype : ... (3 Replies)
Scenario:
Each of several .txt files contain the following (but perhaps with some minor variations due to code version running on the devices from which the text was extracted):
<output omitted>
SWITCH1#show proc cpu hist
1... (4 Replies)
Hi all,
on Solaris 10, I'd like to print a range of lines starting at pattern but also including the very first line before pattern.
the following doesn't print the range starting at pattern and going down to the end of file: cat <my file> | sed -n -e '/<pattern>{x;p;}/'
I need to include the... (1 Reply)
Hi,
I have a file as below
This is the line one
This is the line two
<\XMLTAG>
This is the line three
This is the line four
<\XMLTAG>
Output of the SED command need to be as below.
This is the line one
This is the line two
<\XMLTAG>
Please do the need to needful to... (4 Replies)
The following text is in testFile.txt:
one 5
two 10
three 15
four 20
five 25
six 10
seven 35
eight 10
nine 45
ten 50
I'd like to use sed to print the first occurance of search pattern /10/ in a given range. This command is to be run against large log files, so to optimize efficiency,... (9 Replies)
I have config file like this:
server_name xx opt1 opt2 opt3
suboptions1
#suboptions - disabled
suboptions2 pattern
suboptions3
server_name yy opt1 opt2 opt3
suboptions1 pattern
#suboptions - disabled
suboptions2
So basically I want to extract the server... (1 Reply)
In the awk below I am trying to print out those lines in file2 that are no between $2 and $3 in file1. Both files are
tab-delimeted and I think it's close but currently it is printeing out the matches. The --- are not part of the files they are just to show what lines match or fall into
the range... (6 Replies)
I have big files (some are >300GB!) that need substitution for some patterns, for example, change Multiple Spaces into Tab. I used this oneliner:sed '1,18s/ \{1,\}/\t/g' infile_big.sam > outfile_big.sambut it seems very slow as the job is still running after 24 hours! In this example, only the... (8 Replies)
Discussion started by: yifangt
8 Replies
LEARN ABOUT REDHAT
mewls
MEWLS(1) General Commands Manual MEWLS(1)NAME
mewls - Message scanner for Mew
SYNOPSIS
mewls [options] [folder [range]]
DESCRIPTION
The mewls utility extracts necessary fields from messages stored in folders. This command is necessary for Mew to implement the asynchro-
nous feature.
The options are as follows:
-a Print all necessary fields when picking.
-b dir Set the Mail home to dir.
-c dir Set the News home to dir.
-d field
Set th field to be extracted to field.
-e command
Specify an external command to fetch mailbox.
-m options
Specify options for command.
-f fields
Specify fields to display.
-h Display this help message.
-i file Set the input stream to file.
-l length
Set the field max length to be extracted to length. The default value is 3. 0 means no limit.
-n Don't use fstat().
-p pattern
Specify the pick pattern.
-s src Set message source to src : '+folder range'.
-w time Set the wait_for timer to timer (microsecond).
-v Display the version.
Definitions of the symbols above are as follows:
range N | [start]-[end] | last:N
pattern 'key=val' | 'key!=val' | '!<pattern>' | '(<pattern>)' | '<pattern>&<pattern>' | '<pattern>|<pattern>'
BUGS
If a field is long, only the beginning three lines are extracted by default.
March 17, 2001 MEWLS(1)