Date: Wed, 25 Feb 1998 16:41:11 -0500 From: Max Euston <meuston@jmrodgers.com> To: "'Julian Elischer'" <julian@whistle.com> Cc: "'FreeBSD Hackers'" <freebsd-hackers@FreeBSD.ORG> Subject: RE: New utilities: factor(1) and wid(1)? Message-ID: <01BD420C.2FCDD020.meuston@jmrodgers.com>
next in thread | raw e-mail | index | archive | help
On Wednesday, February 25, 1998 4:21 PM, Julian Elischer [SMTP:julian@whistle.com] wrote: > Max Euston wrote: > > > > I have 2 utilities that are not in FreeBSD. > > > > - The first if factor(1) ala SVR4. It prints the prime factors of a > > number. I sometimes use it to find the "most efficient" geometry for a HD. > > It is written for 'long's, but I want to have it pick 'int'/'long'/'long > > long' (all unsigned) based on the input for speed (it uses adds, not > > multiplies). > > factor is in /usr/games > > (though it seems limited to rather small numbers) > Silly me... I simply tried: $ factor <XXX> when I should have tried: $ man factor Didn't expect to find it in 'games' ??? - That is not in my PATH=. It uses the 'primes' utility and is doing division (on 'long's) - I will do some investigating to see if it is faster than my method and see if it will scale to 'long long's. > julian > > > > - The second (non Unix) is wid(1). It finds the "width" of a file (longest > > line). It can print longest, shortest, average (mean), totals and can > > ignore trailing spaces. Suggestions for any other features is welcomed. > > can you think of a present program into which it might fit better > a an option? The closest I had ever thought of was wc(1). I will look again. (As I am typing this, I just got mail from Mike Smith suggesting the same idea - I will see if I can make a logical design out of this and merge it cleanly). Since I have been bitten by the "it already does that you boob, just look in XXX" bug twice in the same number of days (remember my adding LINES= to more(1)?) :-((, I will do some more investigating before announcing my plans to "hackers" :-). (Feeling REALLY sheepish... going back to RTFM and play with FreeBSD for a few more days...). Max ----- Max Euston <meuston@jmrodgers.com> Sysadm, Programmer, etc... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01BD420C.2FCDD020.meuston>