"system()" system call

Marten Terpstra a20 at nikhefh.hep.nl
Thu Aug 24 00:10:56 AEST 1989


Hi folks,

I already posted this question to comp.lang.c but since it's very UNIX
I decided to post it here as well.

Consider the following program :

----------------------------
main()
{
int count;
extern int system();

count=system(" mail -s x25-errors terpstra < /tmp/x25_errors ");

}
----------------------------

When I compile and run this (compiling without any problems) the
rather strange error message
Unknown command: "#################################################"
appears.

The "system()" system-call however is executed anyway, so everything
works OK but I don't like having that error-message appearing on my
screen everytime it is executed. (I'm going to use it in CRON so the
message would appear every 15 minutes or so on the console).

As you may have guessed 'terpstra' is my mailbox and /tmp/x25_errors
is a file containing some normal messages.
Does anyone know how to kill this awkward error message ?

Thanks,


            Marten Terpstra   email : terpstra at nikhef.nl
NIKHEF-H (National Institute for Nuclear and High Energy Physics)   Amsterdam
-----------------------------------------------------------------------------
-- Workers of the world arise, you have nothing to loose but your chairs ! --

-- 
            Marten Terpstra   email : terpstra at nikhef.nl
NIKHEF-H (National Institute for Nuclear and High Energy Physics)   Amsterdam
-----------------------------------------------------------------------------
-- Workers of the world arise, you have nothing to loose but your chairs ! --



More information about the Comp.unix.questions mailing list