For something that would be more portable to a system where the groups utility only accepts one operand, the user database on your system is kept in the file /etc/passwd (which is not always true), and assuming that every user has a mail account with their login name as their mail address on that machine (which is not always true), you could also try:
Hi,
I need to write one unix script gor sending a mail notification.
I have to pass the followinf as arguments,from ,to,subject,messege body
Can i use mailx....Please provide the code
Thanks in advance. (1 Reply)
Hi all,
I wrote a shell script to send a mail, it is not showing any errors but i didn't receive any mail
#!/bin/ksh
. ./set_mail_details.ksh
echo 'In script'
subject=$1
echo '\nsubject'
echo $1
echo "$subject" | sed 's/~/ /g' | read sub
body_of_email=$2
echo '\nBody'
echo $2... (7 Replies)
rshstatus=`rsh -n lilo /db/p2/oracle/names9208/restart_names.sh`
if $rshstatus <>0 then
errstatus=1
mailx -s "xirsol8dr" ordba@xxx.com >> $log_dr
else if errstatus=0
echo "status to xirsol8dr successful"
can anyone provide if this is t he correct way to do this or is there a better way? (1 Reply)
Dear all,
The perl script to send e-mail is working in my current script.
#This part of the script will send the email notification
my $to='mohamed.rahman@noridian.com';
my $from='xyz@hotmail.com';
my $subject='POS_CODES_38 DATA LOADED SUCCESSFULLY.';
my $message='The total no. of files... (2 Replies)
I have a file 1.txt which has 3 mail ids as below:
Maillist=abc@gmail.com def@gmail.com rcg@gmail.com
Now I want to write a script which will read this file and send the mail to all the users present in this file. (6 Replies)
Hi All
I am trying to do ssh to different server and on the remote server for each user trying to get groups of that user but i am not getting the required
result.
ssh username@ip_address "for i in $( cat /etc/passwd| cut -d: -f1);do groups $i done;exit" >>abc.txt
only names are... (5 Replies)
Hi Guys,
I am not Good at scripting.
I need to write a script such that if output of command shows the particular word in output then send mail to abc@compay.com
-bash-3.2$ ps -ef | grep bpbkar
root 6040 1 0 13:05:19 ? 0:00 bpbkar -r 2678400 -ru root -dt 47395 -to 0... (20 Replies)
Discussion started by: manalisharmabe
20 Replies
LEARN ABOUT PHP
conflict
CONFLICT(8) [nmh-1.5] CONFLICT(8)NAME
conflict - search for alias/password conflicts
SYNOPSIS
/usr/lib/mh/conflict [-search directory] [-mail name] [-version] [-help] [aliasfiles ...]
DESCRIPTION
Conflict is a program that checks to see if the interface between nmh and the transport system is in good shape
Conflict also checks for maildrops in /var/mail which do not belong to a valid user. It assumes that no user name will start with `.', and
thus ignores files in /var/mail which begin with `.'. It also checks for entries in the group(5) file which do not belong to a valid user,
and for users who do not have a valid group number. In addition duplicate users and groups are noted.
If the -mail name switch is used, then the results will be sent to the specified name. Otherwise, the results are sent to the standard
output.
The -search directory switch can be used to search directories other than /var/mail and to report anomalies in those directories. The
-search directory switch can appear more than one time in an invocation to conflict.
Conflict should be run under cron(8), or whenever system accounting takes place.
FILES
/etc/nmh/mts.conf nmh mts configuration file
/etc/passwd List of users
/etc/group List of groups
/usr/bin/mh/mhmail Program to send mail
/var/mail/ Directory of mail drop
PROFILE COMPONENTS
None
SEE ALSO mh-alias(5)DEFAULTS
`aliasfiles' defaults to /etc/nmh/MailAliases
CONTEXT
None
MH.6.8 11 June 2012 CONFLICT(8)