Walt Pawley wrote:
 > wump$ time sed "s/ .*//" Desktop/klog > kadr1

Note that this is a job for cut(1):

$ cut -d" " -f1 input

Interestingly, the fastest way to do that job is to use
a regular expression with Python.  This is about twice
as fast as the proposed perl solution:

$ python -c 'import re; print re.sub(" .*\n", "\n", file("input").read())'

(Of course, in a script you would write that command in
a more readable way instead of trying to squeeze it all
on a single line.)

Best regards
   Oliver

PS:  Of course, if you really need the last percent of
speed, then you should write your own specialized tool
in C.

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"FreeBSD is Yoda, Linux is Luke Skywalker"
        -- Daniel C. Sobral
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to