Sponsored Content
Full Discussion: Send mail based on a group
Top Forums Shell Programming and Scripting Send mail based on a group Post 302760817 by Yoda on Thursday 24th of January 2013 03:52:40 PM
Old 01-24-2013
Works for me!

Here is the data in file: input_file
Code:
$ cat input_file
Manual m456@hotmail.com

Here I am running awk commenting out the mailing part:
Code:
$ awk '{ print $2 | "sort | uniq" } ' input_file | while read mail_id
do
        awk ' BEGIN { print "Assigned Values: " } /'$mail_id'/ { print $1 } ' input_file ###| mailx -s "Group Info" ${mail_id}
done
Assigned Values:
Manual

Note: Use nawk for Solaris and SunOS
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies

2. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

3. Shell Programming and Scripting

how to write a shellscript to send a mail alert to the website user based on license expiration time

hi, i am very much new to shell scripting i have a requirement that i have to develop a License Renewal Alert system that has to give a alert mail to the users before 30days of user account expiration, by checking expiration date of the user with the data base, this system will... (0 Replies)
Discussion started by: deepu_Shscripts
0 Replies

4. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

5. UNIX for Advanced & Expert Users

Group the records based on empno and send mail

Hi All, I have records in a file with name,SSO,openitems,manageremail with | delimited file.Now i want to group the records by SSO and openitems and send email to their manageremail. kiran|1111|draft|aaa@gmail.com guna|2222|reject|bbb@gmail.com kiran|1111|submitter|aaa@gmail.com... (2 Replies)
Discussion started by: kiranparsha
2 Replies

6. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

7. Ubuntu

Not able to send mail out of UbuntuBox in send mail

Hi Guys.. yesterday i purchased a VPS server and installed sendmail on ubuntu 12.4 with Webmin & Apache runing webserver problem is.. i can send mail via webmin user interface account to anybody to out side to any domain and able to recieve any mail from any domain.. Now main... (2 Replies)
Discussion started by: cmdman
2 Replies

8. UNIX for Beginners Questions & Answers

Read a file and send mail based on grep

Hi All, I am having a job and I need to send email when the job is running. On any other case (success,fail) I don't needed to send email. I check with BMC they told they dont have that in the version I am using. So I created a dependent job and grepped for the status and sent email. My... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

9. UNIX for Beginners Questions & Answers

Manipulate condition to send mail based on output text in file

Hi All, I have a working script as below. echo "Files loaded with $(cat /var/tmp/script.X1.out)" | mail -s "Files loaded with return code" mailid This script takes the output from script.X1.out file and appends the text "Files loaded with return code" and sends the email. Now what I want... (5 Replies)
Discussion started by: midhun3108
5 Replies

10. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
LIPO(1) 						      General Commands Manual							   LIPO(1)

NAME
lipo - create or operate on universal files SYNOPSIS
lipo [-info] [-detailed_info] [-arch arch_type input_file] ... [ input_file] ... [-arch_blank arch_type] [-create] [-thin arch_type] [-replace arch_type filename] ... [-remove arch_type] ... [-extract arch_type] ... [-extract_family arch_type] ... [-verify_arch arch_type ...] [-output output_file] [-segalign arch_type value] ... DESCRIPTION
The lipo command creates or operates on ``universal'' (multi-architecture) files. It only ever produces one output file, and never alters the input file. The operations that lipo performs are: listing the architecture types in a universal file; creating a single universal file from one or more input files; thinning out a single universal file to one specified architecture type; and extracting, replacing, and/or removing architectures types from the input file to create a single new universal output file. Only one option can be specified, with the exception of -arch, -arch_blank, -output, and -segalign, which are used in combination with other options. The input_file argument is required, and only the -create option allows more than one input_file to be specified. The -output flag must be used, except with the -info and -detailed_info flags. The arch_type arguments may be any of the supported architecture names listed in the man page arch(3). OPTIONS
-info Briefly list the architecture types in the input universal file (just the names of each architecture). -detailed_info Display a detailed list of the architecture types in the input universal file (all the the information in the universal header, for each architecture in the file). -arch arch_type input_file Tells lipo that input_file contains the specified architecture type. The -arch arch_type specification is unnecessary if input_file is an object file, a universal file, or some other file whose architecture(s) lipo can figure out. -arch_blank arch_type Specifies that the output for the specified arch_type will be an MH_DYLIB_STUB file. This flag may not be used with any operation other than -create. -output output_file Specifies its argument to be the output file. -create Take the input files (or file) and create one universal output file from them. -thin arch_type Take one input file and create a thin output file with the specified arch_type. -replace arch_type file_name Take one universal input file; in the output file, replace the arch_type contents of the input file with the contents of the speci- fied file_name. -remove arch_type Take one universal input file and remove the arch_type from that universal file, placing the result in the output file. -extract arch_type Take one universal input file and copy the arch_type from that universal file into a universal output file containing only that architecture. -extract_family arch_type Take one universal input file and copy all of the arch_types for the family that arch_type is in from that universal file into an output file containing only those architectures. The file will be thin if only one architecture is found or universal otherwise. -verify_arch arch_type ... Take one input file and verify the specified arch_types are present in the file. If so then exit with a status of 0 else exit with a status of 1. -segalign arch_type value Set the segment alignment of the specified arch_type when creating a universal file containing that architecture. value is a hexa- decimal number that must be an integral power of 2. This is only needed when lipo can't figure out the alignment of an input file (currently not an object file), or when it guesses at the alignment too conservatively. The default for files unknown to lipo is 0 (2^0, or an alignment of one byte), and the default alignment for archives is 4 (2^2, or 4-byte alignment). SEE ALSO
arch(3) Apple Computer, Inc. September 12, 2006 LIPO(1)
All times are GMT -4. The time now is 03:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy