The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
read a file in shell and put result in a line lottiem Shell Programming and Scripting 6 07-06-2009 05:16 PM
How to assign the result of a SQL command to more than one variable in shell script. little_wonder Shell Programming and Scripting 4 05-06-2009 11:04 PM
get result from database into shell script ali560045 Shell Programming and Scripting 1 02-03-2009 04:56 AM
The shell script is not returning proper result clnsharma123 AIX 1 01-25-2008 04:54 AM
Could any one tell me how to do get result in fraction in shell script Neerajjaiswal Shell Programming and Scripting 5 01-09-2008 08:18 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-21-2009
s_linux s_linux is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 81
shell script result to file

Since I'm not an expert in shell scripting, I have question on sending script result to file. I have script like this...

if condition=0: then
echo "service is not running" | mail -s "Server Status" uname@companyname
fi
sleep 10
if configtion=1: then
echo "service is not running" | mail -s "Server Status" uname@companyname
fi

else
echo "service is running" | mail -s "Server Status" uname@companyname
fi

script is working fine but getting 3 mails from the server.

Instead sending 3 emails, I want to put all 3 in 1 file, send an email with attached file. Any idea.

Thanks
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0