oracle - KSH Script Formatting With Mailx -


alright, have been asked script. needs email user if there error associated id. won't go detail on because sql portion correctly. don't know how pull out each user email sql individually , email them 1 @ time attach error ticket associated email body.

my ksh script have now.

 #!/usr/bin/ksh  # sets environment variables . /data/pmes/pmes/pmes_scripts/pmes_env_var.config  # sets results of .sql file emailbody variable emailbody=`sqlplus -s $userid/$ppasswd@$database @/data/pmes/pmes/pmes_scripts/testingmail2.sql`  # these email addresess emailed when script completes mail_id='emailme@yoursite.com'  (echo "$emailbody")|mailx -s "test email`"  $mail_id  

output of echo $emailbody

 aaron.heckel@yoursite.com 20140801_br_bob,d_pzxkgx steve.naman@yoursite.com 20140816_am_andrew,d_pzxkgx  

(it email issue id. each item has space in between them)

any appreciated. i'm new mailing , sqlplus in unix.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -