Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Send email attachment using Operating System Script(UNIX) in Oracle Alerts Post 302956717 by nosi27 on Friday 2nd of October 2015 09:56:52 AM
Old 10-02-2015
Thank you for the respose.I am still new to Unix.PLease tell how am i suppose to write all messages into one file.

See below the SQL statement for the alert:
select papf.employee_number
, papf.full_name
, papf.start_date date_joint
, pps.ADJUSTED_SVC_DATE
, paaf.date_probation_end
-- , papfs.employee_number
, papfs.full_name supervisor
, papfs.email_address supervisor_email_address
, paaf.probation_period
, haou.name
'test@gmail.com' mail

into
&employee_number
, &full_name
, &date_joint
, &adj_serv_date
, &prob_end_date
, &supervisor
, &supervisor_email_address
, &probation_period,
, &department
,&tt
from apps.per_all_assignments_f paaf,
apps.per_all_people_f papf,
apps.hr_all_organization_units haou,
apps. per_all_people_f papfs,
apps.per_periods_of_service pps
where paaf.person_id = papf.person_id
--and papf.employee_number = '720040049'
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
and trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date
and trunc(sysdate) between papfs.effective_start_date and papfs.effective_end_date
and haou.organization_id = paaf.organization_id
and papfs.person_id = paaf.supervisor_id
and pps.period_of_service_id = paaf.period_of_service_id
and paaf.date_probation_end is not null
and ( months_between ( date_probation_end, to_date('30-SEP-2015','DD/MM/YYYY') )= 9 -- trunc(sysdate)+7
or
months_between ( date_probation_end, to_date('30-SEP-2015','DD/MM/YYYY') ) = 6
or
months_between ( date_probation_end, to_date('30-SEP-2015','DD/MM/YYYY') ) = 3
or
months_between ( date_probation_end, to_date('30-SEP-2015','DD/MM/YYYY') )= 0)
and probation_period = 12
and paaf.primary_flag = 'Y'

then action type is as follows(I wanted to paste the PRINTSCREEN here but I couldnt):

Action Type : Operating Sytem Script

Text : if [[ -n "&employee_number" ]]
then
echo "Employee Number: &employee_number"
fi|mutt -s "Attachment" -a /u01/ProgressReport.doc &tt

Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I send a file as an attachment (gzip file) on a Unix system

Hi, How do I send a file as an attachment (gzip file) on a Unix system ? Using sendmail. Please help me. :confused: (3 Replies)
Discussion started by: lacca
3 Replies

2. Shell Programming and Scripting

script that will send and email attachment

I'm looking for a sample of some code that will take the output from a file and generate an email that will include that text as an attachment. the script is in the borne shell. any help? (2 Replies)
Discussion started by: davels
2 Replies

3. Shell Programming and Scripting

send email from unix with attachment

Hello All, This is a common question that I found lot of results in the forums. I am trying to use uuencode to attach a file and send email. I have no issues sending email, but not able to attach any files using sendmail. Is uuencode part of sendmail or does 'uuencode' utility need to be... (1 Reply)
Discussion started by: chiru_h
1 Replies

4. Shell Programming and Scripting

Send email with attachment in form of excel in unix

Hi, I have a shell script which send email with an attachment in the form of an email. However, the when I open the attachment, all the data comes in one column. How do I format the data in the excel sheet while sending the email? Thanks (8 Replies)
Discussion started by: bdebroy
8 Replies

5. AIX

Send email from unix (AIX) with PDF attachment

I am using the following command to send PDF attachment with a mail. uuencode <attachment.pdf> <attachment.pdf>|mailx -s <subject> <mail_id> < <Message_file.txt> This one send the message with attachment. I would like send PDF attachment with the mail Can any one help with this issue ? ... (0 Replies)
Discussion started by: sunjup
0 Replies

6. Shell Programming and Scripting

unable to send an email attachment

i know its pretty repeated query, but i need to post it in this new thread coz i need it urgently uuencode /var/tmp/chandra/emaillist.txt emaillist.txt | mail -s "message with encoded attachment" am unable to send the attachment emaillist.txt present in the path /var/tmp/chandra/ Is... (11 Replies)
Discussion started by: cmaroju
11 Replies

7. Shell Programming and Scripting

Logic to send email alerts only 5 times a day

Hi, I have written below disk space monitoring script to monitor disk space every minute. I have scheduled this script through cron. But now my problem is this script alerts the users continuously until the space is freed up. These emails are filling up the inbox exponentially until the space... (3 Replies)
Discussion started by: svajhala
3 Replies

8. Shell Programming and Scripting

Not able to send attachment with the email

Hi All, The below code is working fine for me. mailx -s hello abc@xyz.com <<EOT Hello !!! How are you? Regards Rahul EOT But i am not able to send csv file with the mail .Getting just themail but not the attachment. uuencode /path/s1.csv | mailx -s hello abc@xyz.com <<EOT... (9 Replies)
Discussion started by: rafa_fed2
9 Replies

9. Shell Programming and Scripting

How to check email with attachment received or not from UNIX shell script?

Hello Guys, Here is the requirement!! I want to check the mail with attachment received or not through unix scripting. And send an notification email when mail with attachment already received. Any thoughts on this is much appreciated!! Regards, Harry (0 Replies)
Discussion started by: dharry2017
0 Replies

10. HP-UX

Unable to send attachment with html tables in UNIX shell script

Heyy, any help would be grateful.... LOOKING FOR THE WAYS TO SEND AN EMAIL WITH ATTACHMENT & HTML TABLES IN BODY THROUGH SHELL SCRIPT (LINUX)..NOT SURE, IF WE HAVE ANY INBUILT HTML TAG OR UNIX COMMAND TO SEND THE ATTACHMENTS. KINDLY HELP below is small script posted for our understanding..... (2 Replies)
Discussion started by: Harsha Vardhan
2 Replies
ideviceinstaller(1)					      General Commands Manual					       ideviceinstaller(1)

NAME
ideviceinstaller - Manage iDevice apps SYNOPSIS
ideviceinstaller [OPTIONS] DESCRIPTION
Allows to install, upgrade, uninstall, archive, restore and enumerate installed or archived apps on iDevices. OPTIONS
General options: -d, --debug enable communication debugging. -U, --uuid UUID target specific device by its 40-digit device UUID. -h, --help prints usage information Commands: -l, --list-apps list apps installed on the device. Additional options: -o list_user list user apps only (apps installed by the user) This is the default. -o list_system list system apps only (apps available from the system firmware) -o list_all list all types of apps -o xml print output in xml format (PList) -i, --install ARCHIVE install app from a package file specified by ARCHIVE. -u, --uninstall APPID uninstall app specified by APPID. -g, --upgrade APPID upgrade app specified by APPID. -r, --restore APPID restore archived app specified by APPID. -L, --list-archives list archived applications on the device. Additional options: -o xml print output in xml format (PList) -a, --archive APPID archive app specified by APPID. Additional options: -o uninstall uninstall the package after making an archive -o app_only archive application data only -o copy=PATH copy the app archive to directory PATH when done -o remove only valid when copy=PATH is used: remove after copy -R, --remove-archive APPID remove app archive specified by APPID. AUTHOR
This manual page was written by Martin Szulecki. ideviceinstaller(1)
All times are GMT -4. The time now is 08:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy