Search the web
Sign In
New User? Sign Up
wlshell
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to use mail/mailx from within Wlshell   Message List  
Reply | Forward Message #595 of 675 |
Re: How to use mail/mailx from within Wlshell

--- 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










Mon Jan 23, 2006 11:31 am

martinbuechler
Offline Offline
Send Email Send Email

Forward
Message #595 of 675 |
Expand Messages Author Sort by Date

I am generating a file from wlshell. How can I email that file from with wlshell? Any help is greatly appreciated Thanks, Arun...
A S
arun1311
Offline Send Email
Oct 19, 2005
11:36 am

... In your wlsh script use something like ... MAIL=<path-to>/alarm.sh EMAIL=alert@... if $messagesinqueue > $THRESHOLD then CMD=expr(${MAIL} + " " +...
martinbuechler
Offline Send Email
Jan 23, 2006
3:10 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help