Script on pattern matching and print lines and export to excel
Hi Friends,
I am working on a script.. Looking forward for your expert help.....
My requirement is:
I have a text file where, need to search equip * RTF or end of line with RTF ,once this pattern is found then print 2nd line, 6th line, 7th line to a different file.
For Ex:
OutPut will be
so on.. Thr wil be many lines matching equip 1 RTF...
Regards
Shalini
Last edited by Yogesh Sawant; 06-29-2009 at 05:48 AM..
Reason: added code tags
Hi :),
I am using the script to search "MYPATTERN" in MYFILE and print that block of lines containing the pattern starting with HEADER upto FOOTER.
But my problem is that at some occurrence my footer is different e.g. ";". How to modify the script so that MYPATTERN between HEADER and different... (1 Reply)
Hi
I have a file (say 'file1')and I want to search for a first occurence of pattern (say 'ERROR') and print ten lines in the file below pattern. I have to code it in PERL and I am using Solaris 5.9.
I appreciate any help with code
Thanks
Ammu (6 Replies)
Dear Experts,
I have file called file1 in which i am greping a pattern after that i want to next 3 lines when that pattern is matched.
Ex:- file1
USA
UK
India
Africa
Hello
Asia
Europe
Australia
Hello
Peter
Robert
Jo
i want to next 3 lines after matching Hello... (12 Replies)
i have a file as below
sample.pl
parameter1
argument1
argument2
parameter2
I want out as below
argument1
argument2
that is , i want to print all the lines between parameter1 & parameter 2.
i tried with the following
if($mystring =~ m/parameter1(.*?)parameter2/) (2 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)
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Hi all,
I want to search for strings in file1 that can be found in file2 and print out the whole line when matching pattern is found.
I have used the below command, but this is not working for me, because it is writing out only the matching patterns from file2, not the whole line.
fgrep -o... (2 Replies)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
would like to print everything after matching two patterns AAA and BBB.
output :
CCC
ZZZ
sample data :
AAA
BBB
CCC
ZZZ (4 Replies)
Discussion started by: jhonnyrip
4 Replies
LEARN ABOUT REDHAT
rtf2rtf
RTF2RTF(1) General Commands Manual RTF2RTF(1)NAME
rtf2rtf - programs to postprocess the raw RTF generated by the mapping files
SYNOPSIS
rtf2rtf [options] ..
DESCRIPTION
This manual page documents briefly the rtf2rtf commands. This manual page was written for the Debian GNU/Linux distribution because the
original program does not have a manual page for rtf2rtf.
rtf2rtf is a program to postprocess the raw RTF generated by the mapping files.
It is used by other programs in sgml-tools (v1), and usually normal user does not need to use this program directly.
Following is quoted from the README in the source tree.
(Begin Quotes)
I'm not proud of this code. It's a hack foisted upon a hack, nested within another hack or two. It sort of works well enough for my pur-
poses (generating WinHelp .RTF files for my documents), but it could definitely use a redesign/rewrite. It started as a simple pertubation
of the html2html filter, but got ugly very quickly...
I shamelessly blame the RTF format for most of the hackery here -- RTF is not a _language_ like LaTeX or ROFF -- it's just a file format.
So, we can't rely on RTF to do even simple things like "insert a paragraph break here only if the previous token was not also a paragraph
break. Since the SGML front end has no conditional processing capabilities, multiple blank likes in the SGML get translated to multiple
para breaks in the RTF. That's why we use a "lex" filter (rtf2rtf) to postprocess the raw RTF generated by the mapping files.
Again: I offer this to the Linuxdoc community with the hopes that it will be useful to others and that someone else can help flesh out the
missing pieces. What? Missing pieces? Yes, recall that I say it works "well enough for my purposes". The replacement files (general, map-
ping) started out like as the latex replacement files. Much of them still _are_ the latex replacement files. I only converted those parts
that are actually used by my documents. Your documents may require more of the files to be translated to RTF.
Since I'm using these mappings for actual documentation, I plan on maintaining this backend, so please send me any improvements -- I'll
coordinate with Greg to make sure they get into the the next official release.
(End Quotes)
OPTIONS
The programs does not support normal command line option.
SEE ALSO
For a complete description, see the README file in the source archive.
AUTHOR
rtf2rtf was written by Steve Tynor (tynor@atlanta.twr.com) December 1995. This manual page was written by Taketoshi Sano
<sano@debian.org>, for the Debian GNU/Linux system (but may be used by others).
RTF2RTF(1)