Archive for Mac

Useful Unix Commands: fmt

For a while, I’ve been keeping a file of useful Unix commands and interesting usage examples. I’ll post some of those here from time to time.

I’ll start with a nice little utility
that reformats text to a given line width: fmt. The basic syntax is
quite simple: fmt -80 myfile.txt formats the text
contained in myfile.txt to a maximum line width of 80 characters and outputs
it on standard out (like most Unix commands, fmt will take its
input from standard input if you omit file name).

fmt inserts line breaks as necessary (any whitespace character is a valid insertion point), and also removes unncessary line breaks. Line breaks
that mark the end of a paragraph will be preserved (the end of a paragraph is defined as a line break immediately followed by another, or a line break on an empty line).

Additional command-line options apply uniform spacing (-u for the GNU version, -s for the BSD version), format mail header lines
sensibly (-m BSD only), and specifiy a goal length the output
lines should get as close as possible to, while not exceeding the specified maximum line width (fmt ..., BSD only). Another nifty use of fmt in the BSD version is to center
lines of text. For this, only the -c option has to be specified
(and the input file(s) if the input is not read from standard input).

Of course there are much more powerful text processing utilites available on
any given Unix system, but often simple utilities like fmt are
completely sufficient and much easier to learn ;-)

Resources:

Comments (2)

No User-Serviceable Parts Inside?

iMac G5 inside

Courtesy of Apple

Apparently not with the new iMac G5:
Two new Apple Knowledge Base documents indicate users can replace almost all parts themselves (including the LCD and the mainboard), and detect the cause
of hardware failures using diagnostic LEDs. (AppleInsider)

In case you’re still in the earlier stages of getting familiar with your new
iMac, Apple also provides you with instructions on how to pick it up ;-) (DasGenie: !Scrap)

Comments

The Most Important Switcher Question

Can I run Solitaire on a Mac?

Apple’s switcher website devotes
an entire page to that subject :-)

In the unlikely case of Solitaire not being the most important app for
potential switchers, there’s also side-by-side comparisons of over a dozen
more applications on that page. I guess they forgot Minesweeper, though ;-)

Comments

Crunch Time Essentials

If you’re studying for exams right now, you’ll need this!
Lockout (Linux) to keep you from spending too much time online, and Pizza Cooker 2.0 (Mac OS X) to at least prevent your from burning your pizza if you get caught up surfing anyway ;-)

Comments

Vortrag “Mac OS X Programmierung” in German

Beim letzten Treffen der Mac User Group Stuttgart habe ich einen Vortrag zum Thema Mac OS X Programmierung mit Cocoa, Objective-C und Xcode gehalten. Die Folien gibt es hier zum Download:

  • Druckversion (pdf)
  • Farbig, alle Folien (pdf)

Comments (1)

« Previous Entries Next Entries »