Sponsored Content
Full Discussion: A schoolboyish stuff
Top Forums Shell Programming and Scripting A schoolboyish stuff Post 302366621 by kinny on Friday 30th of October 2009 02:50:37 AM
Old 10-30-2009
A schoolboyish stuff

Hi ,
This is a pretty simple sed command i found when i was checking out one of the codes of my colleague .

sed -e 's/\[A-Za-z]*.*\) \(\ <1[a-z]*e\ >\) \([a-zA-Z]*.*\)/\2/'

When i tried this on a few text files it was displaying the entire line. If this was to display entire line why sweat out on a sed . Does this has more than just that.

Can someone clarify ?

Well theres one more on the same lines
sed -e ' { / </ { N; /\n.*. { s/\ <.\n.* >/ < >/ } } }'

Last edited by Franklin52; 10-30-2009 at 05:26 AM.. Reason: Please use code tags!

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple stuff.

I hacked my TIVO a few months ago. I made a computer specifically for this, but I only used a UNIX boot disk to get all the TIVO goodies to work. I am intersted in getting some version of UNIX on this machine and getting it onto my network. I only want to do some simple file transfers, maybe... (1 Reply)
Discussion started by: IamJAWA
1 Replies

2. Windows & DOS: Issues & Discussions

weird stuff

I coudln't think of another topic to post this under as the OS on the system is XP pro. Ok here is the go. I'm upgrdaing a mates computer. A AMD 1200Mhz and well it wouldn't boot from the CD to do a fresh install (By upgrade I mean OS with complete new install). So I opened up the box and... (4 Replies)
Discussion started by: woofie
4 Replies

3. Shell Programming and Scripting

Please help with monitoring stuff

Hi, I am trying to write a script to do monitoring kind of stuff, requirement - when a server is given a start it updates a file called server.log, I need to keep on grepping the word "Running" and as soon as it comes , script should be exited with the message , "Server came up... (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies

4. Shell Programming and Scripting

awk stuff

Hi, My input file data will be |ABCD|EFGH|IJKL|MNOP |ABCD|EF\|GH|IJKL|MNOP I am expecting output , |"ABCD"|"EFGH"|"IJKL"|"MNOP" |"ABCD"|"EF|GH"|"IJKL"|"MNOP" Note : The change basically the pipe deilmited file does contain | as value for some of the column but | will come with... (8 Replies)
Discussion started by: Nandy
8 Replies

5. Programming

More Arduino Stuff...

HI all... (Apologies for any typos.) To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format. Ignore "*.info" files these are AMIGA icons only and also the "HAM" drawer as these are photos in ancient AMIGA HAM modes. I have noticed that there are current... (6 Replies)
Discussion started by: wisecracker
6 Replies
IO::Async::Protocol::LineStream(3pm)			User Contributed Perl Documentation		      IO::Async::Protocol::LineStream(3pm)

"IO::Async::Protocol::LineStream" - stream-based protocols using lines of text SYNOPSIS
Most likely this class will be subclassed to implement a particular network protocol. package Net::Async::HelloWorld; use strict; use warnings; use base qw( IO::Async::Protocol::LineStream ); sub on_read_line { my $self = shift; my ( $line ) = @_; if( $line =~ m/^HELLO (.*)/ ) { my $name = $1; $self->invoke_event( on_hello => $name ); } } sub send_hello { my $self = shift; my ( $name ) = @_; $self->write_line( "HELLO $name" ); } This small example elides such details as error handling, which a real protocol implementation would be likely to contain. DESCRIPTION
The following events are invoked, either using subclass methods or CODE references in parameters: on_read_line $line Invoked when a new complete line of input is received. PARAMETERS
The following named parameters may be passed to "new" or "configure": on_read_line => CODE CODE reference for the "on_read_line" event. METHODS
$lineprotocol->write_line( $text ) Writes a line of text to the transport stream. The text will have the end-of-line marker appended to it; $text should not end with it. AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2012-10-24 IO::Async::Protocol::LineStream(3pm)

Featured Tech Videos

All times are GMT -4. The time now is 02:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy