> Whenever I open up an xterm window or use a console with my user
> account, I have .bash_profile run the fortune program. Oddly (this is
> recent) whenever I print anything on my cheap DeskJet, a page is printed
> with just one fortune on it, and it has the stair-step problem b/c a
> line advance/carriage return was not sent. Then everything else prints
> correctly. Any clues? Graci.

You might wnat to read the bash manpage about the startup scripts, and
when they're used -- I have a feeling your fortune is printed on
non-interactive scripts, such as the one run for the print filter.

To fix, you need to wrap fortune with something like this:

if [ -t 1 ]; then
   fortune
fi

This will prevent it from running unless it's on a terminal (the test asks
if fd 1 (STDOUT) is a terminal).

_____________________   _                    _   _________________________
         Michael Rice  |_|    Collective    |_|  http://www.colltech.com
   [EMAIL PROTECTED]    |_  Technologies  _|    8007598888/8019292 pager 
           Consultant      []            []      "The Power Of Many Minds"   

---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to