[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] unix email in SQR



The only suggestion I can come up with is to check which version of 
"echo" your production server is using ("which echo" at a command 
prompt). Sometimes using a full pathname for the echo command (when you 
setup the command in the SQR report) will provide more predictable 
results. Below is some info from the "man" pages of an older Solaris 
unix box to illustrate what I am getting at.

The theory being that something in the contents of your SQR generated 
variable is being taken by the "echo" command as something other than 
plain "content".

Also, what is the default shell for users on the production server (or 
at least the one that SQR commands are executed in) korn, bourne, 
cshell? That may be effecting how "echo" is behaving differently from 
your other servers.

If you can grab the actual value of #unix_status you may get a better 
idea of how "echo" is crashing.

Bob.

* * *

NAME
     echo - echo arguments

SYNOPSIS
     /usr/bin/echo [ string ... ]

USAGE
     Portable applications should not use -n (as the first  argu-
     ment) or escape sequences.

     The printf(1) utility can be used portably to emulate any of
     the traditional behaviors of the echo utility as follows:

        o  The Solaris 2.6 operating  environment  or  compatible
           version's/usr/bin/echo is equivalent to:

           printf "%b\n" "$*"


        o  The /usr/ucb/echo is equivalent to:


     if [ "X$1" = "X-n" ]

     then

             shift

             printf "%s" "$*"

     else

             printf "%s\n" "$*"

     fi

     New applications are encouraged to  use  printf  instead  of
     echo.


sqr-users-request@sqrug.org wrote:

>I think multiple people have suggested that I let my $command variable be
>the product of left-carroting a file to my mailx command, like this -  
>
>mailx -s "subject" email@comp.com  < /path/email_body_in_file.txt
>
>That's what I've now implemented, although we haven't had the process
>trigger the email section with that $command yet.  We only get an email from
>the process when a new business_unit is added, and it doesn't happen every
>day.  It works on our DEV and TST systems, but so did the other way.  I'll
>let you all know if it worked for PRODUCTION. 
>
>>From a UNIX perspective, I'm still confused why echo pipe to mailx doesn't
>work.  Or, I should say that I'm really confused why it worked on one system
>and not the other.  I dont know if it was something in the SQR or if it was
>the command itself.  
>
>Thanks to all those who gave me ideas.
>  
>
-- 

===
Bob Foster
Info. Systems Coordinator
Mid-Michigan MRI, Inc.
Direct Line: (517) 364-2673
rkf@radiology.msu.edu <mailto:rkf@radiology.msu.edu>

Need a Better Web Browser?
Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=829&t=1>

Here was a non admissible message part of 'text/x-vcard' MIME type. It
has been automatically discarded before sending the message to the
list. 
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users