Nino’s Reminders

April 23, 2007

Fortune cookies

Filed under: Miscellaneous — nino @ 12:14

Cookies are kept in a plain text file. You have to do your own text wrap, ie place newlines yourself. Quotes should be divided by an otherwise empty line beginning with a percentage sign (%). After that, invoke strfile textfile textfile.dat (part of fortune package) to create a hash file needed for fortune program. To print fortune cookie every time a user logs in, put a file named zlogin (assuming you use zsh) in /etc with the following line: /usr/games/fortune [fortune database] && echo (echo for better formatting)

Blog at WordPress.com.