Hi
I have written an email script in python which sends email to the given id.
I have customized the script for generating space alert inside a shell script as shown below
Code:
df -h /microfocus > /tmp/spacereport
## Filter the %usage to variable per
per=$(awk '{if (NR==3){print $4}}' /tmp/spacereport)
## Strip off the character % from the variable per
result=`echo $per|sed s/.$//`
Greetings.
I have script to monitor the disk space of folder it runs every 17 min with help of cron. It sends email when disk size reaches to 85 %. Now the issue is that it continousely generates email until we clear some space in that folder.
Dear All need advice,
I just want broadcast email with mail from shell script, where the script look up the file that contain email address and password
Code:
#!/bin/bash
SUBJECT="Mailserver Baru"
ISIEMAIL="/tmp/emailmessage.txt"
for a in `(sed 's/"//g;s/\,.*//g' $1)`;
do
echo > $ISIEMAIL
EMAIL="$a"
echo "Dear $a" >> $IS
Hi im writing my first script which is basically aimed at looking at proccesses exceeding the 25% CPU usage mark and emailing any it finds
So far I have this:
Code:
#Send process which has exceeded 25%
#
if ps -eo pri,pid,user,nice,pcpu,comm | awk '{if($5 >= 25)print $0}' > /export/home/tjmoore/file2
#
#
then
/usr/local/bds/mailsend.s mailx "Process
This is my below script which is working fine as it send only plain text email.
So My question is- How can I modify my below script to send this as an HTML formatted email? I want to show the text color of this expression `(echo "100*$TEST2/$TEST1" | bc -l)` as `RED` in an email and that can be done only in HTML formatted emails.
Hi,
I have a requirement to work on script, it should take either of arguments.
wrote it as below.
Code:
#!/bin/bash
usage() {
echo "$0: missing argument OR invalid option !
Usage : $0 [-v][-h] -m|-r|-d
}
while getopts mrdvh opt; do
case "$opt" in
m) monitor_flag=monitor;;
r)&
This is a script in visual basic that basically sends an email from an existing account, in this case the example is provided for live.com.
Hi Guys,
I'm a newb at shell scripting and successfully attempted a small disk space script (victory!!) but i'm wondering whether it actually takes into consideration KB,MB,GB.
Hi all,
Im a newbie to Unixshell script .Please explain me what this below shell script does and assistance with me a description
Code:
################################
# CODE #
################################
if [[ $# -ne 4 ]]
then
echo "Usage: $(basename $0) \$SS_APPL \$SS_DB \$S_U_PATH \$SS_HOME_PATH"