Sponsored Content
Top Forums Shell Programming and Scripting Join Lines every paragraph in a file.txt Post 302983264 by lxdorney on Sunday 9th of October 2016 08:34:46 AM
Old 10-09-2016
thanks for the reply anyway i have sample file in my google drive public share Update your browser to use Google Drive - Drive Help

When I apply the script to the sample text files from google drive public share. file content is in one line only
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

join on a file with multiple lines, fields

I've looked at the join command which is able to perform what I need on two rows with a common field, however if I have more than two rows I need to join all of them. Thus I have one file with multiple rows to be joined on an index number: 1 randomtext1 2 rtext2 2 rtext3 3 rtext4 3 rtext5... (5 Replies)
Discussion started by: crimper
5 Replies

2. 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

3. Shell Programming and Scripting

how do i join two lines from a input file

HI all, i have a input file,i have to join 2nd line into firstline and 4th line into 2nd line and so on.. for this we also consider odd no. of line.It's operate on original input file but output file should temp file. like .. filename=cdr.cfg line1 line2 line3 line4Desired output should be... (9 Replies)
Discussion started by: suryanarayan
9 Replies

4. Shell Programming and Scripting

sed to cp lines x->y from 1.txt into lines a->b in file2.txt

I have one base file, and multiple target files-- each have uniform line structure so no need to use grep to find things-- can just define sections by line number. My question is quite simple-- can I use sed to copy a defined block of lines (say lines 5-10) from filename1.txt to overwrite an... (3 Replies)
Discussion started by: czar21
3 Replies

5. Shell Programming and Scripting

merging two .txt files by alternating x lines from file 1 and y lines from file2

Hi everyone, I have two files (A and B) and want to combine them to one by always taking 10 rows from file A and subsequently 6 lines from file B. This process shall be repeated 40 times (file A = 400 lines; file B = 240 lines). Does anybody have an idea how to do that using perl, awk or sed?... (6 Replies)
Discussion started by: ink_LE
6 Replies

6. UNIX for Dummies Questions & Answers

find lines in file1.txt not found in file2.txt memory problem

I have a diff command that does what I want but when comparing large text/log files, it uses up all the memory I have (sometimes over 8gig of memory) diff file1.txt file2.txt | grep '^<'| awk '{$1="";print $0}' | sed 's/^ *//' Is there a better more efficient way to find the lines in one file... (5 Replies)
Discussion started by: raptor25
5 Replies

7. Shell Programming and Scripting

join lines in file

I have a file like this: --------------------------------------------------------------- 26 00:04:48,440 --> 00:04:51,440 I don't know why he can't just do the Great Apache Flaming Arrow Act. 27 00:04:52,440 --> 00:04:54,839 Didn't you tell him to use the gopher snake? 28... (1 Reply)
Discussion started by: thailand
1 Replies

8. UNIX for Dummies Questions & Answers

Join lines in a file????

Hello UNIX gurus, I am new to the world of UNIX. Hopefully I am submitting my question at the right forum. Here is my dilemma - I have a file with contents like this - "line1","Hello","World","Today is a wonderful day","yes it is" "line2","Hello","World","Today is a beautiful day","oh... (8 Replies)
Discussion started by: foolishbar
8 Replies

9. Shell Programming and Scripting

Getting lines from .txt file

Hi I have a file with contents: NAMES John carrey williams How can I get all the names and store them in seperate variables(or arrays) please keep in mind that the no. of such names is not known.Three here is a bogus value ~thanks (4 Replies)
Discussion started by: leghorn
4 Replies

10. Shell Programming and Scripting

Join multiple lines from text file

Hi Guys, Could you please advise how to join multiple details lines into single row, with HEADER 1 as the record separator and comma(,) as the field separator. Input: HEADER 1, HEADER 2, HEADER 3, 11,22,33, COLUMN1,COLUMN2,COLUMN3, AA1, BB1, CC1, END: ABC HEADER 1, HEADER 2,... (3 Replies)
Discussion started by: budz26
3 Replies
Mason::Plugin::HTMLFilters(3pm) 			User Contributed Perl Documentation			   Mason::Plugin::HTMLFilters(3pm)

NAME
Mason::Plugin::HTMLFilters - Filters related to HTML generation FILTERS
HTML or H Do a basic HTML escape on the content - just the characters '&', '>', '<', and '"'. <input name="company" value="<% $company | H %>"> HTMLEntities Do a comprehensive HTML escape on the content, using HTML::Entities::encode_entities. URI or U URI-escape the content. <a href="<% $url | U %>"> HTMLPara Formats a block of text into HTML paragraphs. A sequence of two or more newlines is used as the delimiter for paragraphs which are then wrapped in HTML ""<p>""...""</p>"" tags. Taken from Template::Toolkit. e.g. % $.HTMLPara {{ First paragraph. Second paragraph. % }} outputs: <p> First paragraph. </p> <p> Second paragraph. </p> HTMLParaBreak Similar to HTMLPara above, but uses the HTML tag sequence "<br><br>" to join paragraphs. Taken from Template::Toolkit. e.g. % $.HTMLPara {{ First paragraph. Second paragraph. % }} outputs: First paragraph. <br><br> Second paragraph. FillInForm ($form_data, %options) Uses HTML::FillInForm to fill in the form with the specified $form_data and %options. % $.FillInForm($form_data, target => 'form1') {{ ... <form name='form1'> ... % }} SUPPORT
The mailing list for Mason and Mason plugins is mason-users@lists.sourceforge.net. You must be subscribed to send a message. To subscribe, visit https://lists.sourceforge.net/lists/listinfo/mason-users <https://lists.sourceforge.net/lists/listinfo/mason-users>. You can also visit us at "#mason" on <irc://irc.perl.org/#mason>. Bugs and feature requests will be tracked at RT: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mason-Plugin-HTMLFilters bug-mason-plugin-htmlfilters@rt.cpan.org The latest source code can be browsed and fetched at: http://github.com/jonswar/perl-mason-plugin-htmlfilters git clone git://github.com/jonswar/perl-mason-plugin-htmlfilters.git SEE ALSO
Mason perl v5.14.2 2012-06-11 Mason::Plugin::HTMLFilters(3pm)
All times are GMT -4. The time now is 03:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy