Question about redirection...

Everett Lipman lipm at quads.uchicago.edu
Wed Sep 12 04:43:38 AEST 1990


Hi.  I recently wrote a program to do the job of biff, because
our machine (a sun) does not notify us when mail arrives.
During my early attempts, I ran across this problem:

I had a file called "chkmail", which contained the following lines:

~/bin/cmail
at now + 1 minute chkmail > /dev/null

My intention was to have chkmail (which was marked executable) run
from my .login, and continue until my .logout removed the "at" job.
~/bin/cmail checked for mail, and printed a message if mail had arrived.

What I wanted was for the line ( job 4259 at 13:32 September 7 1990 )
which was generated by "at" not to be printed.  Instead, it thought
I meant "run chkmail, and redirect the output of chkmail to /dev/null".
I tried to remove this ambiguity with backquotes, quotes, and parentheses,
all of which failed.  Does anyone know how I could do this without
using an alias?  BTW, I have realized that there is a better solution 
to the original problem (a background process).

Everett Lipman (lipm at midway.uchicago.edu)



More information about the Comp.unix.questions mailing list