From owner-freebsd-questions Sun Oct 4 08:06:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA17189 for freebsd-questions-outgoing; Sun, 4 Oct 1998 08:06:24 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA17175 for ; Sun, 4 Oct 1998 08:06:11 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from ben by scientia.demon.co.uk with local (Exim 2.04 #11) id 0zPpT3-0005RS-00; Sun, 4 Oct 1998 15:49:01 +0100 Date: Sun, 4 Oct 1998 15:49:00 +0100 From: Ben Smithurst To: Steve Howe Cc: "Alain G. Fabry" , freebsd-questions@FreeBSD.ORG Subject: Re: Printing out man pages Message-ID: <19981004154900.B20807@scientia.demon.co.uk> References: <19981003145142.A7999@scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: User-Agent: Mutt/0.94.3i (FreeBSD 3.0-BETA i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Steve Howe wrote: > i didn't know "col" was more efficient than "sed". col is half the > size of sed, and less complex, so you are probably correct that it is > more "efficient" in a physical sense. I don't know if it is === ben@scientia[p0]:~$ time man bash | sed 's/.^H//g' > /dev/null real 0m1.405s user 0m1.280s sys 0m0.125s === ben@scientia[p0]:~$ time man bash | col -b > /dev/null real 0m0.601s user 0m1.490s sys 0m0.110s Certainly seems quicker though :-) > however, sed is a better tool all around, and has a greater variety > of uses, so it may be more efficient in a realistic sense for a new > user to become familiar with sed. True, and I still haven't learnt much about it :-( > if the question applies to why is it in a shell script, the answer > is that users of FreeBSD all have different uses for the OS. and if > my needs don't require my to learn every xyz utility and all their > options, my effiency is increased by placing commonly used functions > in scripts so i don't have to remember all the details. I suppose so.... -- Ben Smithurst : ben@scientia.demon.co.uk : http://www.scientia.demon.co.uk/ PGP: 0x99392F7D - 3D 89 87 42 CE CA 93 4C 68 32 0E D5 36 05 3D 16 http://www.scientia.demon.co.uk/ben/pgp-key.html (or use keyservers) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message