Felis is a simple command line utility for Unix users, though it can be compiled and used under any modern operating system.

Similar to the Unix cat utility, felis dumps the contents of one or more files (or, those of stdin) to stdout.

Unlike cat, felis will strip any leading and trailing white space. It will also replace any other white space with a blank. If several white space characters appear in a row, felis will combine them into a single blank. If more than one input files are specified on the command line, felis will insert a single blank between their contents.


felis [filename [...]]

If no parameters are specified, felis reads its input from stdin. It always sends its ouput to stdout, and, of course, can be redirected to a file or pipe:

felis file1 file2 > file3

Sample Use

Suppose you have a file that contains the email addresses of your customers, named customers, which may look something like this:


You have another file, named friends, which has these contents:


Now, you want to send the same email to all of your customers and friends. You type your message into a file named message.

To mail it, you simply type:

sendmail `felis customers friends` < message

The Unix shell will replace `felis customers friends` with the output of the felis command, and will run

sendmail rich@customer.com peter@piper.com tom@thumb.org annie@orphanage.edu < message

This is the main purpose I wrote it for.

Another possible usage is to strip extra blanks from an HTML file before posting it on the web. The browser would strip them anyway, so you may as well do it to reduce the size of the file and save some bandwidth.

You can edit the file locally, using meaningful formatting for your own sanity, then strip it with felis. That is precisely what I did with this file:

felis felis.html > index.html


To get felis for your own use, download felis-1.0.tar.gz from here, or from the unix directory of my ftp site. Then use your favorite C compiler to compile it.

The Name...

Felis is the Latin word for cat.

[ Home ]

Copyright © 2000 G. Adam Stanislav.
All rights reserved.