Tuesday, June 24, 2003

fortune's FreeBSD tips

The program 'fortune', which is often called in the .login file by default, has a nice collection of FreeBSD tips. You can access this a couple of ways:


$ /usr/games/fortune freebsd-tips


will print a single tip to your screen, while


$ /usr/games/fortune -m col freebsd-tips | less


will dump all the tips that contain the sequence 'col' to your screen. This will show you the nice short way using the col command to strip DOS End Of Line characters from your files (those are the ones that look like ^M in many places):


$ col -bx < DOSFIle > BSDFile


although I guess it also replaces tabs with spaces. An easier way is to just use the dos2unix command (and it's opposite, unix2dos).




1 comment:

  1. Where would one find fortune-mod for FreeBSD? I can't find it in my ports tree at the moment.

    ReplyDelete