Mozilla Mail script help needed
I use Mozilla's Mail program and I modified just the end of the signature script recently discussed here on SLE that Ralph got working on Kmail. I'm wondering if it will work with Mozilla mail. I saved it as .signature in my home directory, then did a 'chmod u+x .signature' to make it executable and then told mozilla where to find my signature file and guess what? It doesn't work. E-mails come back with the exact text of the script, not the output of the script, as I'll illustrate below. Any thoughts on this? Note: The line below beginning $disp is all one line but gets truncated by my mail program (mozilla). -- #!/usr/bin/perl # get current kernel version $version = `uname -r`; # get current uptime @uptime = split /\s+/, qx(uptime); ($hours, $minutes) = split /[:,]/, $uptime[5]; $disp = "Current Linux uptime: " . $uptime[3] . " days " . $hours . " hours " . $minutes . " minutes."; # version string has built-in newline. print "\tYours,\n\tBrian.\nI proudly use SuSE Gnu/Linux 8.0 Professional. \nKernel version $version$disp\n"; exit(0);
On Wednesday 01 May 2002 12:49 pm, Brian W. Carver wrote:
I use Mozilla's Mail program and I modified just the end of the signature script recently discussed here on SLE that Ralph got working on Kmail. I'm wondering if it will work with Mozilla mail.
I saved it as .signature in my home directory, then did a 'chmod u+x .signature' to make it executable and then told mozilla where to find my signature file and guess what? It doesn't work. E-mails come back with the exact text of the script, not the output of the script, as I'll illustrate below. Any thoughts on this?
Your mail got me interested in trying this script w/ kmail 1.3.2 I adapted the script as I wanted it but recieve the message "Unrecognized character \xA0 at ./.signature line 7." when I try running it from a shell prompt. I know nothing about perl, but when I comment out line 7 the script works as I would expect. just no uptime info. My version of the script follows; --------------------------------------------------------------------------- #!/usr/bin/perl # get current kernel version $version = `uname -r`; # get current uptime @uptime = split /\s+/, qx(uptime); ($hours, $minutes) = split /[:,]/, $uptime[5]; $disp = "I've been awake: " . $uptime[3] . " days " . $hours . " hours ". $minutes . " minutes."; # version string has built-in newline. print "\tdh\nSuse Linux 7.2 professional\nkernel $version$disp\n"; exit(0); -------------------------------------------------------------------------------- The "@uptime = split /\s+/, qx(uptime);" line is where my problem lies. Can someone show me the light? dh
participants (2)
-
Brian W. Carver
-
David Herman