Re: mailing captured output with template text

2002-01-29 Thread Gary
You have gotten lots of suggestions about the system call etc. So I do not have much to say about that other than to point out that the code you have written is not very portable (since it relies on the unix command df). If you want a platform independent solution there is a perl alternative to

Re: mailing captured output with template text

2002-01-28 Thread John
I think output is lost with system - maybe my $results = `$cmd`; Also the print is not needed before the EOF. At Monday, 28 January 2002, "McCormick, Rob E" wrote: >Gang, > >Using 'df -k' in bash, I can get this to work acceptably: > ># mail the disk usage for a file system to a recipient 'ui

Re: mailing captured output with template text

2002-01-28 Thread Deen Hameed
Hi Rob, You don't need to put the system call in backticks. You could just do $result = `some command`; to get the output of the command stored as a multiline string in $result. system() does not store the output of the command, only the exit status of the command you have called. I d

Re: mailing captured output with template text

2002-01-28 Thread John W. Krahn
Rob E McCormick wrote: > > Thanks for the prompt repliesmy apologies, but I'm not grasping the > quoting problem(s) or another problem.? > > I revised the code to use an @array v. $scalar. I also noticed I left out > the -odq option in the perldoc example, so inserted it (as docs indica

RE: mailing captured output with template text

2002-01-28 Thread McCormick, Rob E
Thanks for the prompt repliesmy apologies, but I'm not grasping the quoting problem(s) or another problem.? I revised the code to use an @array v. $scalar. I also noticed I left out the -odq option in the perldoc example, so inserted it (as docs indicate, controls queuing/delay ) Update

RE: mailing captured output with template text

2002-01-28 Thread Nikola Janceski
rom: McCormick, Rob E [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 5:29 PM To: perl beginners (E-mail) Subject: mailing captured output with template text Gang, Using 'df -k' in bash, I can get this to work acceptably: # mail the disk usage for a file system to a recipien

mailing captured output with template text

2002-01-28 Thread McCormick, Rob E
Gang, Using 'df -k' in bash, I can get this to work acceptably: # mail the disk usage for a file system to a recipient 'uid' df -k /data/wrc |mailx -s 'host disk usage' [EMAIL PROTECTED] I'd like to use perl to surround the output of df -k with a simple text message. I used perldoc -q mail to