![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| sending mail | parmeet | UNIX for Dummies Questions & Answers | 11 | 05-13-2009 04:37 AM |
| help sending mail | mierdatuti | Ubuntu | 2 | 01-09-2009 02:51 PM |
| hp ux not sending mail | kkhan | HP-UX | 3 | 01-31-2008 11:27 PM |
| sending mail | mskarica | UNIX for Advanced & Expert Users | 3 | 04-12-2005 09:59 AM |
| sending a mail to a mail client | solaris73 | UNIX for Dummies Questions & Answers | 5 | 11-18-2002 01:58 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Need help in sending data through mail
Hello there,
I'm trying to send the data stored in a variable through a mail as body of the mail. But not able send the data through mail. Here is my code: var1= df -k | awk '{print $1 " " $5}' echo "This is the alert msg" > mail_body.txt echo "$var1" >> mail_body.txt SENDER=test@t.com RECIPIANTS=test1@t.com mailx -s "Subject - mail subj" -r ${SENDER} ${RECIPIANTS} < mail_body.txt Whenever I'm running the script, the recepiant is receivng mail with the body "This is the alert msg'. But not able to receive the data in "var1". Your help is more appreciate. |
|
||||
|
sorry.. still facing the issue with that. Encountered the error like unexpected '('. I've used following command:
var1=$(df -k | awk '{print $1 " " $5}') Please suggest... -----Post Update----- I resolved this issue by redirecting the value to another text file. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|