LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] sed question

[ILUG] sed question

John Allen john.allen at orbiscom.com
Fri Feb 20 07:52:32 GMT 2004


On Thursday 19 February 2004 20:09, P at draigBrady.com wrote:
> Kenn Humborg wrote:
> >>OK I've a (very big) file like:
> >>
> >>0
> >>0
> >>1
> >>1
> >>2
> >>2
> >>3
> >>3
> >>
> >>
> >>I would like to find and print the "2" lines,
> >>AND THEN STOP PRCOCESSING the humungous file.
> >>
> >>I was thinking of using sed, and the q command.
> >
> > I'd be thinking of using awk.
>
> Due to the size of the file and my previous
> bad experiences with awk's speed I don't
> think so.
>

In this case I think awk would be as fast as anything, but then again why not 
try perl, or python, os sh & grep.

> I can build a C proggy using glibc's getline and regex
> in a couple of minutes rather than do that.
>
> thanks,
> Pádraig.

-- 
John Allen,                          mailto:john.allen at orbiscom.com
Orbiscom Ireland Ltd,                Web:    http://www.orbiscom.com/
Orbiscom House,                      Direct: +353-1-2178610
3 Arkle Road,                        Office: +353-1-2945111
Sandyford Ind Est,                   Fax:    +353-1-2945119
Dublin 18,
Ireland.

MandrakeClub Silver Member.          http://www.dublinux.net

Mandrake Linux release 10.0 (RC1) for i586, kernel 2.4.22-21mdk
 07:51:47 up 13 days, 15:37,  2 users,  load average: 0.03, 0.04, 0.00



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell