over the past month or so, I do have to thank all of you for your tremendous help that you have given me in Perl and Shell scripting. I have learned tons and I look forward to being just as helpful to others as well.
In fact I am steadily rewriting shell codes we have to Perl so that I may further my knowledge of it. The Perl scripts that I have been editing have been done by someone a long time ago that is no longer employed.
The new problem on the same script is the shell command of mail. The script does what it supposed to do of creating a list of users and their stats and then creating a list of printer and their stats without breaking code or needing two different scripts. I managed to do it with sub routines however I have noticed that when I try to use the
Code:
exec("$home/bin/test /<path>/$f | mail -s \"$h\" prn-testing");
where $f is the log file (which changes ever month) and the $h is the subject. It will only email the first half of what is printed to the screen. How do I solve this without writing it to a file and then emailing the file? This server, however powerful, the powers to be do not want anything else installed such as modules and such. All this has been done the long way and some ways via shell calls using system and exec. If I end up have to write a file, how do I write the file on a temp bases and when it gets mailed, erase it?