Sponsored Content
Top Forums Programming PERL:Combining multiple lines to single line Post 302624275 by Kalaiela on Monday 16th of April 2012 05:04:09 AM
Old 04-16-2012
MySQL PERL:Combining multiple lines to single line

Hi All
I need a small help for the below format in making a small script in Perl or Shell.

I have a file in which a single line entries are broken into three line entries.
Eg:
I have a
pen and
notebook.

All i want is to capture in a single line in a separate file.
eg: I have a pen and notebook.

Thanks in Advance for your help.

Regards
Kalaiela
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replacing multiple lines with single line

Can any one give me the idea on replacing multiple blank lines with a single blank line? Please conside it for a file having more than 100 number of characters. Regards, Siba (3 Replies)
Discussion started by: siba.s.nayak
3 Replies

2. Shell Programming and Scripting

Getting multiple messy lines into one single line

I have a file that contains the following: :@:176:@:4:@:name:@:file:@:this is a summary:@:description can be long but who knows can even have <br> tags.:@:how to:@:type:@:18544:@:550:@:400:END: :@:177:@:9:@:name:@:file:@:summary:@:this will containg... (18 Replies)
Discussion started by: sysrenan
18 Replies

3. Shell Programming and Scripting

Multiple lines into a single line

Hi, I've some files with the following data and i need to convert the lines between the separator ---, into a single line. I've tried with the paste cmd but my main problem is that the number of lines between the separator is not fix, it can very between 1-4 lines. Input --- 2010-02-22... (4 Replies)
Discussion started by: RickyC9999
4 Replies

4. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

5. Shell Programming and Scripting

merging multiple lines into single line

Hi, 1. Each message starts with date 2. There is blank line between each message 3. Each message does not contain same number of lines. Any help in merging multiple lines in each message to a single line is much appreciated. AIX: Korn Shell Error log file looks like below. ... (5 Replies)
Discussion started by: bala123
5 Replies

6. UNIX for Dummies Questions & Answers

Need help combining txt files w/ multiple lines into csv single cell - also need data merge

:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux. I am working in Linux terminal. I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Discussion started by: jetsetter
2 Replies

7. Shell Programming and Scripting

Combining multiple block of lines in one comma separated line

Hi Everyone, On my Linux box I have a text file having block of few lines and this block lines separated by one blank line. I would like to format and print these lines in such a way that this entire block of lines will come as single comma separated line & again next block of lines in next... (7 Replies)
Discussion started by: gr8_usk
7 Replies

8. Shell Programming and Scripting

Combining lines into a single line

i have a file (where the column values are separated by ' and the text can be enclosed in ~) which contains data in form of 4461,2,~Basic: 2 Years/Unlimited Miles Drivetrain: Gas Engine 2 Years/Unlimited Miles Duramax Engine 3 Years/Unlimited... (2 Replies)
Discussion started by: rahulchandak
2 Replies

9. UNIX for Beginners Questions & Answers

Multiple lines to single line

I have code as below # create temporary table `temp4277`(key(waybill_no)) select waybill_no,concat_ws('',card_type,card_series_no) cardinfo from rfid_temp_ticket where waybill_no='4277' group by... (4 Replies)
Discussion started by: kaushik02018
4 Replies

10. Shell Programming and Scripting

Log4j combining lines to single line

Hi, Our log4j file contents look like this: 2018-11-20T00:06:58,888 INFO ql.Driver: Executing command(queryId=hive_20181120000656_49af4ad0-1d37-4312-872c-a247ed80c181): CREATE TABLE RESULTS.E7014485_ALL_HMS_CAP1 AS SELECT name,dept from employee Where employee='Jeff'... (4 Replies)
Discussion started by: wahi80
4 Replies
Gtk2::Notebook(3)					User Contributed Perl Documentation					 Gtk2::Notebook(3)

NAME
Gtk2::Notebook HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::Notebook INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable METHODS
widget = Gtk2::Notebook->new integer = $notebook->append_page ($child, $tab_label=undef) o $child (Gtk2::Widget) o $tab_label (scalar) (integer return since Gtk2-Perl 1.080) integer = $notebook->append_page_menu ($child, $tab_label, $menu_label) o $child (Gtk2::Widget) o $tab_label (Gtk2::Widget or undef) o $menu_label (Gtk2::Widget or undef) (integer return since Gtk2-Perl 1.080) integer = $notebook->get_current_page $notebook->set_current_page ($page_num) o $page_num (integer) integer = $notebook->get_group_id Since: gtk+ 2.10 $notebook->set_group_id ($group_id) o $group_id (integer) Since: gtk+ 2.10 integer = $notebook->insert_page ($child, $tab_label, $position) o $child (Gtk2::Widget) o $tab_label (scalar) o $position (integer) (integer return since Gtk2-Perl 1.080) integer = $notebook->insert_page_menu ($child, $tab_label, $menu_label, $position) o $child (Gtk2::Widget) o $tab_label (Gtk2::Widget or undef) o $menu_label (Gtk2::Widget or undef) o $position (integer) (integer return since Gtk2-Perl 1.080) widget or undef = $notebook->get_menu_label ($child) o $child (Gtk2::Widget) $notebook->set_menu_label ($child, $menu_label=undef) o $child (Gtk2::Widget) o $menu_label (Gtk2::Widget or undef) string = $notebook->get_menu_label_text ($child) o $child (Gtk2::Widget) $notebook->set_menu_label_text ($child, $menu_text) o $child (Gtk2::Widget) o $menu_text (string) integer = $notebook->get_n_pages $notebook->next_page widget or undef = $notebook->get_nth_page ($page_num) o $page_num (integer) integer = $notebook->page_num ($child) o $child (Gtk2::Widget) $notebook->popup_disable $notebook->popup_enable integer = $notebook->prepend_page ($child, $tab_label=undef) o $child (Gtk2::Widget) o $tab_label (scalar) (integer return since Gtk2-Perl 1.080) integer = $notebook->prepend_page_menu ($child, $tab_label, $menu_label) o $child (Gtk2::Widget) o $tab_label (Gtk2::Widget or undef) o $menu_label (Gtk2::Widget or undef) (integer return since Gtk2-Perl 1.080) $notebook->prev_page list = $notebook->query_tab_label_packing ($child) o $child (Gtk2::Widget) $notebook->remove_page ($page_num) o $page_num (integer) $notebook->reorder_child ($child, $position) o $child (Gtk2::Widget) o $position (integer) boolean = $notebook->get_scrollable $notebook->set_scrollable ($scrollable) o $scrollable (boolean) boolean = $notebook->get_show_border $notebook->set_show_border ($show_border) o $show_border (boolean) boolean = $notebook->get_show_tabs $notebook->set_show_tabs ($show_tabs) o $show_tabs (boolean) $notebook->set_tab_border ($border_width) o $border_width (integer) boolean = $notebook->get_tab_detachable ($child) o $child (Gtk2::Widget) Since: gtk+ 2.10 $notebook->set_tab_detachable ($child, $detachable) o $child (Gtk2::Widget) o $detachable (boolean) Since: gtk+ 2.10 $notebook->set_tab_hborder ($tab_hborder) o $tab_hborder (integer) widget = $notebook->get_tab_label ($child) o $child (Gtk2::Widget) $notebook->set_tab_label_packing ($child, $expand, $fill, $pack_type) o $child (Gtk2::Widget) o $expand (boolean) o $fill (boolean) o $pack_type (Gtk2::PackType) $notebook->set_tab_label ($child, $tab_label=undef) o $child (Gtk2::Widget) o $tab_label (Gtk2::Widget or undef) string = $notebook->get_tab_label_text ($child) o $child (Gtk2::Widget) $notebook->set_tab_label_text ($child, $tab_text) o $child (Gtk2::Widget) o $tab_text (string) positiontype = $notebook->get_tab_pos $notebook->set_tab_pos ($pos) o $pos (Gtk2::PositionType) boolean = $notebook->get_tab_reorderable ($child) o $child (Gtk2::Widget) Since: gtk+ 2.10 $notebook->set_tab_reorderable ($child, $reorderable) o $child (Gtk2::Widget) o $reorderable (boolean) Since: gtk+ 2.10 $notebook->set_tab_vborder ($tab_vborder) o $tab_vborder (integer) Gtk2::Notebook->set_window_creation_hook ($func, $data=undef) o $func (scalar) o $data (scalar) Since: gtk+ 2.10 PROPERTIES
'enable-popup' (boolean : readable / writable / private) If TRUE, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page 'group' (gpointer : readable / writable / private) Group for tabs drag and drop 'group-id' (integer : readable / writable / private) Group ID for tabs drag and drop 'homogeneous' (boolean : readable / writable / private) Whether tabs should have homogeneous sizes 'page' (integer : readable / writable / private) The index of the current page 'scrollable' (boolean : readable / writable / private) If TRUE, scroll arrows are added if there are too many tabs to fit 'show-border' (boolean : readable / writable / private) Whether the border should be shown or not 'show-tabs' (boolean : readable / writable / private) Whether tabs should be shown or not 'tab-border' (Glib::UInt : writable / private) Width of the border around the tab labels 'tab-hborder' (Glib::UInt : readable / writable / private) Width of the horizontal border of tab labels 'tab-pos' (Gtk2::PositionType : readable / writable / private) Which side of the notebook holds the tabs 'tab-vborder' (Glib::UInt : readable / writable / private) Width of the vertical border of tab labels SIGNALS
switch-page (Gtk2::Notebook, gpointer, Glib::UInt) boolean = focus-tab (Gtk2::Notebook, Gtk2::NotebookTab) boolean = select-page (Gtk2::Notebook, boolean) boolean = change-current-page (Gtk2::Notebook, integer) move-focus-out (Gtk2::Notebook, Gtk2::DirectionType) boolean = reorder-tab (Gtk2::Notebook, Gtk2::DirectionType, boolean) page-reordered (Gtk2::Notebook, Gtk2::Widget, Glib::UInt) page-removed (Gtk2::Notebook, Gtk2::Widget, Glib::UInt) page-added (Gtk2::Notebook, Gtk2::Widget, Glib::UInt) Gtk2::Notebook = create-window (Gtk2::Notebook, Gtk2::Widget, integer, integer) ENUMS AND FLAGS
enum Gtk2::DirectionType o 'tab-forward' / 'GTK_DIR_TAB_FORWARD' o 'tab-backward' / 'GTK_DIR_TAB_BACKWARD' o 'up' / 'GTK_DIR_UP' o 'down' / 'GTK_DIR_DOWN' o 'left' / 'GTK_DIR_LEFT' o 'right' / 'GTK_DIR_RIGHT' enum Gtk2::NotebookTab o 'first' / 'GTK_NOTEBOOK_TAB_FIRST' o 'last' / 'GTK_NOTEBOOK_TAB_LAST' enum Gtk2::PackType o 'start' / 'GTK_PACK_START' o 'end' / 'GTK_PACK_END' enum Gtk2::PositionType o 'left' / 'GTK_POS_LEFT' o 'right' / 'GTK_POS_RIGHT' o 'top' / 'GTK_POS_TOP' o 'bottom' / 'GTK_POS_BOTTOM' SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.12.1 2010-07-05 Gtk2::Notebook(3)
All times are GMT -4. The time now is 12:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy