From: Kairam, Raj <[EMAIL PROTECTED]>

> system( "'/usr/bin/lp -dhp4si /tmp/plotreq.txt' > /tmp/plotid.txt");
> If I run the command /usr/bin/lp -dhp4si /tmp/plotreq.txt > /tmp/plotid.txt
> it is fine as a command line.

I may be missing something, but it looks to me like you are running a different 
command from system() than what you are doing on the command line. That is, system() 
apears to be getting this:

    '/usr/bin/lp -dhp4si /tmp/plotreq.txt' > /tmp/plotid.txt

And the shell apears to be getting this:

    /usr/bin/lp -dhp4si /tmp/plotreq.txt > /tmp/plotid.txt


When I need error checking, I'll often use open() instead of system().

---
Rodney Broom



Reply via email to