Sponsored Content
Top Forums Shell Programming and Scripting Script on pattern matching and print lines and export to excel Post 302328763 by vgersh99 on Thursday 25th of June 2009 07:15:11 AM
Old 06-25-2009
no, the output you're quoting was not produced from the previously quoted input.
Please provide the original input resulted in the quoted output.
I think I know what you want - just need a sample input to test.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print block of lines matching a pattern

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)
Discussion started by: vanand420
1 Replies

2. Shell Programming and Scripting

Perl script to match a pattern and print lines

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)
Discussion started by: ammu
6 Replies

3. Shell Programming and Scripting

I want to print next 3 lines after pattern matching.

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)
Discussion started by: naree
12 Replies

4. Shell Programming and Scripting

perl script print the lines between two pattern

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)
Discussion started by: roopa
2 Replies

5. Shell Programming and Scripting

print range of lines matching pattern and previous line

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)
Discussion started by: siriche
1 Replies

6. Shell Programming and Scripting

How to print all the lines after pattern matching?

I have a file that contains... Number -------------------- 1 2 3 4 i want to print all the numbers after the hyphen ... (6 Replies)
Discussion started by: ankitknit
6 Replies

7. Shell Programming and Scripting

Compare file1 for matching line in file2 and print the difference in matching lines

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)
Discussion started by: RasB15
2 Replies

8. Shell Programming and Scripting

Want to print out lines with a matching pattern from file

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)
Discussion started by: MonikaB
2 Replies

9. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

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)
Discussion started by: Klasform
9 Replies

10. Shell Programming and Scripting

Print lines after matching two pattern

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
TROFF2RTF(1)						      General Commands Manual						      TROFF2RTF(1)

NAME
troff2rtf - convert troff documents to Rich Text Format SYNTAX
troff2rtf [ -mxx ] [ -S charset ] [ file ... ] DESCRIPTION
troff2rtf processes documents written to be formatted with troff (or nroff, or any of the other *roff variants) and converts them to Rich Text Format. RTF is a reasonably portable interchange standard; files in RTF format can be read by a variety of applications, e.g., Micro- soft Word, WordPerfect (Macintosh version 2.0 and up), WriteNow. The main use for troff2rtf is to make it easier to transport troff documents for use with microcomputers. First, convert your document to RTF: % troff2rtf [options] file > file.rtf The available options are described below. The one you'll most likely use is -mxx to specify a macro package like -me or -ms. If the doc- ument contains tables, the conversion can be done like this instead: % tblcvt file | troff2rtf [options] > file.rtf Then move the RTF file to your target machine and read it into your document processor. Optional flags may be given to modify the operation of troff2rtf, as follows: -mxx Specify macro package, usually -man, -me, -mm, or -ms. -S charset Specify the RTF character set. charset can be one of the following: ansi mac pc pca. The default is the Macintosh character set. For documents that you intend to use under Windows, -S ansi is a better choice. SEE ALSO
tblcvt(1), troffcvt(1) WHO-TO-BLAME Paul DuBois, dubois@primate.wisc.edu. BUGS
Table output generated when troff2rtf is used in concert with tblcvt has been known to crash Word outright; caution may be in order. In addition, you may need to read the resulting RTF document into a word processor and tweak column widths manually. Word97 adds support for vertically merging table cells (using the clvmgf and clvmrg control words). troff2rtf supports vertical spans using these controls, but earlier versions of Word don't yet understand them. Consequently, what you'll see for n-cell vertical spans is n individual cells, with all the text in the top cell and n-1 empty cells below it. TROFF2RTF(1)
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy