--- In wlshell@yahoogroups.com, "A S" <arun1311@y...> wrote:
>
> I am generating a file from wlshell. How can I email that file from
> with wlshell? Any help is greatly appreciated
>
> Thanks,
> Arun
>
In your wlsh script use something like
--------------
MAIL=<path-to>/alarm.sh
EMAIL=alert@...
if $messagesinqueue > $THRESHOLD then
CMD=expr(${MAIL} + " " + ${messagesinqueue} + " " + $EMAIL)
call $CMD
end
-----------
and your alarm.sh might loook like
-----------
#!/bin/sh
/bin/echo "Queue $1 messages current count" | /usr/bin/mailx -s "JMS
alert: $1 messages current count" $2
exit 0
-----------
But beware EMAIL aka $2 MUST BE a single address, since a ',' in a
parameter assignment throws an error:
Encountered "," at line 4, column 26.
Was expecting one of:
"(" ...
"[" ...
"\n" ...
"expr" ...
"get" ...
"invoke" ...
"new" ...
"prompt" ...
<VARIABLE> ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<CHARACTER_LITERAL> ...
<STRING_LITERAL> ...
<BOOLEAN_LITERAL> ...
<IDENTIFIER> ...
<PARSEABLE_LITERAL> ...
">" ...
">>" ...
please make sure the file exists and the last line ends with an EOL ('\n')
which I consider to be a bug, isn't it Paco?
Regards
Martin