Sponsored Content
Top Forums Shell Programming and Scripting Join lines with the same start string Post 302560805 by ltomuno on Saturday 1st of October 2011 09:52:28 AM
Old 10-01-2011
Code:
sed -n 's/DN[0-9]\{2\}-[0-9]\{3\} //p' input|awk '{ORS="";gsub("\\.",".\n\r");print}'


Last edited by Franklin52; 10-02-2011 at 09:30 AM.. Reason: Please use code tags for data and code samples, thank you
This User Gave Thanks to ltomuno For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

join two lines together

Hi, I have a file with on one line a uid, and on the next line a date. I am trying to make the to into one line. Here's an example: koppx 20031125 kraan 20031119 sarox 20031107 And this is what i want it to be: koppx;20031125 kraan;20031119 sarox;20031107 I have been trying... (4 Replies)
Discussion started by: tine
4 Replies

2. UNIX for Dummies Questions & Answers

how to join lines

can anyone tell me as "how to join all lines in a file " using a shell script Actually i have many files in a directory and for each file i want to join all the lines using a shell scrip . Thanks in advance!!! (8 Replies)
Discussion started by: glamo_2312
8 Replies

3. Shell Programming and Scripting

join 2 lines

hi all i have sample and i need script to do this /dev/xxx oracle test /dev/sap 9999 000 88 99 i need the out put like this /dev/xxx oracle test /dev/sap 9999 000 88 99 can any one provide me with an idea to solve this problem (8 Replies)
Discussion started by: maxim42
8 Replies

4. Shell Programming and Scripting

Appending string, variable to file at the start and string at end

Hi , I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable "$node" and then $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13 and at the end another string " ; COMMIT;" ... (4 Replies)
Discussion started by: Vaddadi
4 Replies

5. Shell Programming and Scripting

join two lines

I want to join this two lines but only when after him I have nothing or a comma Yes, I know Jonesy, and I'll give him about one more minute. this two lines must become Yes, I know Jonesy, and I'll give him about one more minute. thank you very much (11 Replies)
Discussion started by: thailand
11 Replies

6. Shell Programming and Scripting

Remove lines between the start string and end string including start and end string Python

Hi, I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

7. Shell Programming and Scripting

Join Lines

Hi how do I join files like below in script. Thanks, Ashan there are may line like this in the file. zone name DR_TMP_A_sev1_3eA vsan 200 pwwn 50:00:09:73:f0:16:35:08 pwwn c0:50:76:08:6e:dc:00:16 zone name DR_TMP_A_SVR2_3eA vsan 200 pwwn 50:00:09:73:f0:16:35:08 pwwn... (4 Replies)
Discussion started by: ashanabey
4 Replies

8. Shell Programming and Scripting

awk to remove lines that do not start with digit and combine line or lines

I have been searching and trying to come up with an awk that will perform the following on a converted text file (original is a pdf). 1. Since the first two lines are (begin with) text they are removed 2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies

9. UNIX for Beginners Questions & Answers

How do delete certain lines alone which are matching with start and end string values in file?

Hi, In my previous post ( How to print lines from a files with specific start and end patterns and pick only the last lines? ), i have got a help to get the last select statement from a file, now i need to remove/exclude the output from main file: Input File format: SELECT ABCD, DEFGH,... (2 Replies)
Discussion started by: nani2019
2 Replies

10. UNIX for Beginners Questions & Answers

How to print lines from a files with specific start and end patterns and pick only the last lines?

Hi, I need to print lines which are matching with start pattern "SELECT" and END PATTERN ";" and only select the last "select" statement including the ";" . I have attached sample input file and the desired input should be as: INPUT FORMAT: SELECT ABCD, DEFGH, DFGHJ, JKLMN, AXCVB,... (5 Replies)
Discussion started by: nani2019
5 Replies
POE::Filter::IRCD(3pm)					User Contributed Perl Documentation				    POE::Filter::IRCD(3pm)

NAME
POE::Filter::IRCD - A POE-based parser for the IRC protocol. SYNOPSIS
use POE::Filter::IRCD; my $filter = POE::Filter::IRCD->new( debug => 1, colonify => 0 ); my $arrayref = $filter->get( [ $hashref ] ); my $arrayref2 = $filter->put( $arrayref ); use POE qw(Filter::Stackable Filter::Line Filter::IRCD); my ($filter) = POE::Filter::Stackable->new(); $filter->push( POE::Filter::Line->new( InputRegexp => '15?12', OutputLiteral => "1512" ), POE::Filter::IRCD->new(), ); DESCRIPTION
POE::Filter::IRCD provides a convenient way of parsing and creating IRC protocol lines. It provides the parsing engine for POE::Component::Server::IRC and POE::Component::IRC. A standalone version exists as Parse::IRC. CONSTRUCTOR
"new" Creates a new POE::Filter::IRCD object. Takes two optional arguments: 'debug', which will print all lines received to STDERR; 'colonify', set to 1 to force the filter to always colonify the last param passed in a put(), default is 0. See below for more detail. METHODS
"get_one_start" "get_one" "get_pending" "get" Takes an arrayref which is contains lines of IRC formatted input. Returns an arrayref of hashrefs which represents the lines. The hashref contains the following fields: prefix command params ( this is an arrayref ) raw_line For example, if the filter receives the following line, the following hashref is produced: LINE: ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot' HASHREF: { prefix => ':moo.server.net', command => '001', params => [ 'lamebot', 'Welcome to the IRC network lamebot' ], raw_line => ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot', } "put" Takes an arrayref containing hashrefs of IRC data and returns an arrayref containing IRC formatted lines. Optionally, one can specify 'colonify' to override the global colonification option. eg. $hashref = { command => 'PRIVMSG', prefix => 'FooBar!foobar@foobar.com', params => [ '#foobar', 'boo!' ], colonify => 1, # Override the global colonify option for this record only. }; $filter->put( [ $hashref ] ); "clone" Makes a copy of the filter, and clears the copy's buffer. "debug" With a true or false argument, enables or disables debug output respectively. Without an argument the behaviour is to toggle the debug status. MAINTAINER
Chris Williams <chris@bingosnet.co.uk> AUTHOR
Jonathan Steinert LICENSE
Copyright X Chris Williams and Jonathan Steinert This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details. SEE ALSO
POE POE::Filter POE::Filter::Stackable POE::Component::Server::IRC POE::Component::IRC Parse::IRC perl v5.10.1 2009-12-11 POE::Filter::IRCD(3pm)
All times are GMT -4. The time now is 12:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy