Any one know how to redirect standard error (stderr) to a JetDirect printer?
I have configured a JetDirect printer using "Printer Configuration" on a RedHat Linux 7.3. I have no problem issuing the lp command,i.e,'lp foo.txt', or 'echo "Test text"|lp'. I have not figure out how to redirect stderr to the printer. I would like to print stderr from my program to the dedicated JetDirect printer. Example in a C/C++ program, fprintf(stderr, "Error: failed print to JetDirect"). This won't work: "foo_program 2> /dev/lp0" because it is not a local printer. Any suggestion?
|