Interesting base system programs you may not know about...

A while ago FreeBSD forum user Beastie brought to my attention a great little program: math/units which is part of the base system.

So I was wondering if anybody knows of any other useful / interesting base-system gems which may have been overlooked? If you know one, post it here! :)
 
If you list the contents of /usr/bin/ you'll see similarly spirited utilities like bc(), calendar(), ncal().

One program in /usr/bin/ that I find helpful is tee(). With it, you can do something like % prog | tee outfile and you get prog's output sent to standard output and outfile.
 
Netcat! Often overlooked :e

[cmd=] printf "GET / HTTP/1.0\r\n\r\n" | nc host.example.com 80[/cmd]

See nc(1) for more examples.

And I also like dc(1) instead of bc(1). Mainly because it uses RPN (I'm a big fan) and it can do hexadecimal conversions.

Code:
dice@molly:~$ dc
16i
C0
p
192
 
Thanks guys.

Can't believe how much easier shell scripting will be after checking some of these out; it's like someone already thought of most of the things I want to do. It's a pity that the shell scripting books I have read [and largely forgotten!] had only, grep(), cut(), cat(), echo(), sed(), and a few others I'm sure.

I have actually been going through usr/bin and reading randomly selected programs' man pages, but some of them are a bit esoteric, so it's always nice to see how real people actually use these programs for real life problems, especially in combination.
 
In my opinion there's only so much one can learn from a conventional UNIX book. Once you've read one and understand the basics, you're probably better served with Tips&Tricks kind of books (UNIX Power Tools, BSD Hacks, that sort of thing). Also, choosing random commands from /usr/(s)bin and reading up on what they do is a good way of learning, as you've already discovered. And don't forget the FreeBSD fortune(6) cookies.

Fonz
 
Back
Top