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)
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)
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)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
In the awk below, what I am attempting to do is check each line in the tab-delimeted input, which has ~20 lines in it, for a keyword
SVTYPE=Fusion. If the keyword is found I am splitting $3 using the . (dot) and reading the portion before and after the dot in an array a.
If it does have that... (12 Replies)
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT DEBIAN
swiss::stars
SWISS::Stars(3pm) User Contributed Perl Documentation SWISS::Stars(3pm)NAME
SWISS::Stars.pm
DESCRIPTION
SWISS::Stars represents the ** lines within an SWISS-PROT + TrEMBL entry. These are the lines with the line tag ** which are normally not
publicly visible.
SWISS::Stars is a master object like SWISS::Entry. It contains subobjects which represent the different line types in the ** section. Each
line type has a two letter tag in addition to the ** line tag. This module has been written to allow easy addition of new ** line types. To
use a new ** line tag, just use the tag as an object dereference. Example:
$entry->Stars->XX->add("New XX tag line.","Second new XX tag line.");
If there is no class SWISS::Stars::XX, the class of the new object will be SWISS::Stars::default, which handles lines with the
corresponding tag as an array of lines. If more specific handling is required, a new class SWISS::Stars::XX can be created following the
template of SWISS::Stars::default. An example is SWISS::Stars::aa.
Subclass names and new line tags have to be two-letter-tags. No checks are made wheter the dereferenced tag is allowed.
Access to the (old) unstructured ANNOTATOR'S SECTION is provided by the line tag 'aa'.
$entry->Stars->aa->add("Testline 1.","Second new test line.");
will add these two lines to the ANNOTATOR'S SECTION.
Inherits from
SWISS::BaseClass.pm
Attributes
No public attributes apart from the subclasses.
Methods
Standard methods
new
fromText
toText
update
perl v5.10.1 2006-01-26 SWISS::Stars(3pm)