Sponsored Content
Full Discussion: Split a paragraph
Top Forums UNIX for Dummies Questions & Answers Split a paragraph Post 302202712 by jaduks on Thursday 5th of June 2008 12:35:55 PM
Old 06-05-2008
Code:
$ awk '
/^$/{
getline
print NR":"$0
}'  file

//Jadu
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bold the paragraph

Hi, I have a file with multiple paragraph. I want to look for some word and make that paragraph bold. How can I do that? Thanks, Karthik (3 Replies)
Discussion started by: caprikar
3 Replies

2. Shell Programming and Scripting

help, using awk to get paragraph

Hi, I'm trying to find pattern in log file. I'm using awk to search the pattern and print the paragraph. And it's not working well like I want. The file actually is TCAP message, it has format like this : ... ... ... ***************************************** INCOMING TCAP MESSAGE At... (6 Replies)
Discussion started by: kunimi
6 Replies

3. Linux

Extract a paragraph

Hi , Unix.com has been life saver for me I admit :) I am trying to extract a paragraph based on matching pattern "CREATE TABLE " from a ddl file . The paragraphs are seperated by blank line . Input file is #cat zip.20080604.sql1 CONNECT TO TST103 SET SESSION_USER OPSDM002 ... (2 Replies)
Discussion started by: capri_drm
2 Replies

4. Shell Programming and Scripting

Pattern in a paragraph

Hi, I have read similar questions and I was not able to get a solution, so please help :) I have two files: 1-Pattern file contains list of patterns pattern1 pattern2 pattern3 pattern4 .... pattern# 2-input file in the format >hdhfshsdfjhpattern1xmbxmbxnmv... (4 Replies)
Discussion started by: tbakheet
4 Replies

5. UNIX for Dummies Questions & Answers

Output text from 1st paragraph in file w/ a specific string through last paragraph of file w/ string

Hi, I'm trying to output all text from the first paragraph in a file that contains a specific string through the last paragraph in that file that contains that string. Previously, I was outputting just each paragraph with that search string with: cat in_file | nawk '{RS=""; FS="\n";... (2 Replies)
Discussion started by: carpenn
2 Replies

6. Shell Programming and Scripting

awk to split one field and print the last two fields within the split part.

Hello; I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies

7. Shell Programming and Scripting

How to grep paragraph?

Hi, I have A file like this: >Contig1 AAAAAAATTTTTTCCCAATATATGAT ATATATAEATATATAT >Contig2 AAAAAAATTTTTTCCCAATATATGAT ATATATAEAATTTTTAATTTTTTCCCA ATCCCAAATATATAT >Contig3 AAAAAAATTTTTTCCCAATATATGAT ATATATAEAATTTTTAATTTTTTCCCA ATCCCAAATAAATTTTTTCCCAATAT ATGATATATATAEAATTTTTAATTTTT... (3 Replies)
Discussion started by: the_simpsons
3 Replies

8. Shell Programming and Scripting

Compare a paragraph

I know this is a challenging, its about comparing a 3 paragraph, from a whois command, i want to print what is the data that is not unique, example below is the admin phone and techphone, the rest is the same.it will print the correct and wrong # whois google.com| sed -n '/Registry Registrant... (3 Replies)
Discussion started by: kenshinhimura
3 Replies

9. Shell Programming and Scripting

Cat last paragraph only command

Hi guys I am learning CAT command with text files, I have learnt the basics such as finding a word and numbering but say for example I want it to display the last paragraph how would I do this with CAT commands (4 Replies)
Discussion started by: steve2015
4 Replies

10. UNIX for Dummies Questions & Answers

Extract paragraph that contains a value x<-30

I am using OSX. I have a multi-mol2 file (text file with coordinates and info for several molecules). An example of two molecules in the file is given below for molecule1 and molecule 2. The total file contains >50,000 molecules. I would like to extract out and write to another file only the... (2 Replies)
Discussion started by: Egy
2 Replies
Locale::Po4a::Text(3)					User Contributed Perl Documentation				     Locale::Po4a::Text(3)

NAME
Locale::Po4a::Text - convert text documents from/to PO files DESCRIPTION
The po4a (PO for anything) project goal is to ease translations (and more interestingly, the maintenance of translations) using gettext tools on areas where they were not expected like documentation. Locale::Po4a::Text is a module to help the translation of text documents into other [human] languages. Paragraphs are split on empty lines (or lines containing only spaces or tabulations). If a paragraph contains a line starting by a space (or tabulation), this paragraph won't be rewrapped. OPTIONS ACCEPTED BY THIS MODULE
These are this module's particular options: nobullets Deactivate detection of bullets. By default, when a bullet is detected, the bullet paragraph is not considered as a verbatim paragraph (with the no-wrap flag in the PO file), but the module rewraps this paragraph in the generated PO file and in the translation. tabs=mode Specify how tabulations shall be handled. The mode can be any of: split Lines with tabulations introduce breaks in the current paragraph. verbatim Paragraph containing tabulations will not be re-wrapped. By default, tabulations are considered as spaces. breaks=regex A regular expression matching lines which introduce breaks. The regular expression will be anchored so that the whole line must match. debianchangelog Handle the header and footer of released versions, which only contain non translatable informations. fortunes Handle the fortunes format, which separate fortunes with a line which consists in '%' or '%%', and use '%%' as the beginning of a comment. markdown Handle some special markup in Markdown-formatted texts. asciidoc Handle documents in the AsciiDoc format. control[=taglist] Handle control files. A comma-separated list of tags to be translated can be provided. STATUS OF THIS MODULE
Tested successfully on simple text files and NEWS.Debian files. AUTHORS
Nicolas Francois <nicolas.francois@centraliens.net> COPYRIGHT AND LICENSE
Copyright 2005-2008 by Nicolas FRANCOIS <nicolas.francois@centraliens.net>. This program is free software; you may redistribute it and/or modify it under the terms of GPL (see the COPYING file). perl v5.16.3 2014-06-10 Locale::Po4a::Text(3)
All times are GMT -4. The time now is 05:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy