Sponsored Content
Full Discussion: How to grep keywords?
Top Forums Shell Programming and Scripting How to grep keywords? Post 302898049 by khchong on Friday 18th of April 2014 04:30:46 AM
Old 04-18-2014
Hi,

This is my text file:

Code:
This is the first test from a1.loa1 a1v1, b2.lob2, "c3.loc3" c3b1, loc4 but not from mot3 and second test from a5.loa5

The output should look at below:
Code:
a1.loa1
b2.lob2
c3.loc3
loc4
a5.loa5

I don't have any input yet, as i not sure how to start, perhaps it should be using awk or sed and I would be thankful for anyone can help me with this.

Thanks
Moderator's Comments:
Mod Comment Please use CODE (not ICODE) tags for multi-line input, output, and code samples.

Last edited by Don Cragun; 04-18-2014 at 05:42 AM.. Reason: Fix CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regarding use and require keywords

Hi, what is the difference between use and require keywords in Perl. What is the significance of these lines (what it mean, what is the use of this) #!/usr/bin/perl -w // In Perl script.... #!/bin/ksh //In shell script..... Thanks Sweta (2 Replies)
Discussion started by: sweta
2 Replies

2. Shell Programming and Scripting

How to cut id between keywords?

Hi, how to cut id from line ? ....<a class='adata' href='User.php?uid=545554'>.... to 545554 (3 Replies)
Discussion started by: Trump
3 Replies

3. Shell Programming and Scripting

Search a file with keywords

Hi All I have a file of format asdf asf first sec endi asdk rt 123 ferf dfg ijglkp (7 Replies)
Discussion started by: mailabdulbari
7 Replies

4. Shell Programming and Scripting

searching keywords in file

hey guys, Hey all, I'm doing a project currently and want to index words in a webpage. So there would be a file with webpage content and a file with list of words, I want an output file with true and false that would show which word exists in the webpage. example: Webpage content... (2 Replies)
Discussion started by: Johanni
2 Replies

5. UNIX for Dummies Questions & Answers

finding keywords in many files using grep

Hi to all Sorry for the confusion because I did not explain the task clearly. There are many .hhr files in a folder There are so many lines in these .hhr files but I want only the following 2 lines to be transferred to the output file. The keyword No 1 and all the words in the next line They... (5 Replies)
Discussion started by: raghulrajan
5 Replies

6. Shell Programming and Scripting

Parsing with keywords

Hi All, Please help with code for this. I want to parse several huge files and summarize relevant information into columns. The columns of output are title, pagebegin,pageend, author1,author2....,author8, abstract. Column descriptions are as follows. Title Line after single integer value... (3 Replies)
Discussion started by: alpesh
3 Replies

7. Shell Programming and Scripting

Extract word between two KEYWORDS

Hi I want to extract all the words between two keywords HELLO & BYE. eg: Input 1_HELLO_HOW_ARE_YOU_BYE_TEST 1_HELLO_WHERE_ARE_BYE_TEST 1_HELLO_HOW_BYE_TEST Output Required: HOW_ARE_YOU WHERE_ARE HOW (7 Replies)
Discussion started by: dashing201
7 Replies

8. Shell Programming and Scripting

Grep Keywords one by one

Hi I am trying to determine number of lines having a specific keyword. So for that I am using below query: grep -i 'keyword1' filename|wc -l This give me number of lines. Perfect for me. However now the requirement is I have multiple keywords together... and I have to find number of... (3 Replies)
Discussion started by: dashing201
3 Replies

9. AIX

Filtering keywords from syslog.

Hi, My syslog in AIX forwards all user facility to a specific log /logs/user.log I need to further segregate the user.log to logs specific to various applications and i was wondering if i can make some configuration change to syslog.conf to forward messages based on a certain keyword? for... (2 Replies)
Discussion started by: roshan.171188
2 Replies

10. Shell Programming and Scripting

Grep multiple keywords from a file

I have a script that will search for a keyword in all the log files. It work just fine. LOG_FILES={ "/Sandbox/logs/*" } for file in ${LOG_FILES}; do grep $1 $file done This only works for 1 keyword. What if I want to search for more then 1 keywords, say 4 or maybe even... (10 Replies)
Discussion started by: Loc
10 Replies
HTML::FormatRTF(3)					User Contributed Perl Documentation					HTML::FormatRTF(3)

NAME
HTML::FormatRTF - Format HTML as RTF SYNOPSIS
use HTML::FormatRTF; my $out_file = "test.rtf"; open(RTF, ">$out_file") or die "Can't write-open $out_file: $! Aborting"; print RTF HTML::FormatRTF->format_file( 'test.html', 'fontname_headings' => "Verdana", ); close(RTF); DESCRIPTION
HTML::FormatRTF is a class for objects that you use to convert HTML to RTF. There is currently no proper support for tables or forms. This is a subclass of HTML::Formatter, whose documentation you should consult for more information on the new, format, format_file You can specify any of the following parameters in the call to "new", "format_file", or "format_string": lm Amount of extra indenting to apply to the left margin, in twips (twentieths of a point). Default is 0. So if you wanted the left margin to be an additional half inch larger, you'd set "lm => 720" (since there's 1440 twips in an inch). If you wanted it to be about 1.5cm larger, you'd set "lw => 850" (since there's about 567 twips in a centimeter). rm Amount of extra indenting to apply to the left margin, in twips (twentieths of a point). Default is 0. normal_halfpoint_size This is the size of normal text in the document, in half-points. The default value is 22, meaning that normal text is in 11 point. header_halfpoint_size This is the size of text used in the document's page-header, in half-points. The default value is 17, meaning that normal text is in 7.5 point. Currently, the header consists just of "p.pagenumber" in the upper-right-hand corner, and cannot be disabled. head1_halfpoint_size ... head6_halfpoint_size These control the font size of each heading level, in half-twips. For example, the default for head3_halfpoint_size is 25, meaning that HTML "<h3>...</h3>" text will be in 12.5 point text (in addition to being underlined and in the heading font). codeblock_halfpoint_size This controls the font size (in half-points) of the text used for "<pre>...</pre>" text. By default, it is 18, meaning 9 point. fontname_body This option controls what font is to be used for the body of the text -- that is, everything other than heading text and text in pre/code/tt elements. The default value is currently "Times". Other handy values I can suggest using are "Georgia" or "Bookman Old Style". fontname_code This option controls what font is to be used for text in pre/code/tt elements. The default value is currently "Courier New". fontname_headings This option controls what font name is to be used for headings. You can use the same font as fontname_body, but I prefer a sans-serif font, so the default value is currently "Arial". Also consider "Tahoma" and "Verdana". document_language This option controls what Microsoft language number will be specified as the language for this document. The current default value is 1033, for US English. Consult an RTF reference for other language numbers. hr_width This option controls how many underline characters will be used for rendering a "<hr>" tag. Its default value is currently 50. You can usually leave this alone, but under some circumstances you might want to use a smaller or larger number. no_prolog If this option is set to a true value, HTML::FormatRTF will make a point of not emitting the RTF prolog before the document. By default, this is off, meaning that HTML::FormatRTF will emit the prolog. This option is of interest only to advanced users. no_trailer If this option is set to a true value, HTML::FormatRTF will make a point of not emitting the RTF trailer at the end of the document. By default, this is off, meaning that HTML::FormatRTF will emit the bit of RTF that ends the document. This option is of interest only to advanced users. SEE ALSO
HTML::Formatter, RTF::Writer COPYRIGHT
Copyright (c) 2002 Sean M. Burke. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. AUTHOR
Sean M. Burke "<sburke@cpan.org>" perl v5.12.1 2004-06-02 HTML::FormatRTF(3)
All times are GMT -4. The time now is 09:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy