![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| mailx | Paul Byrne | UNIX for Advanced & Expert Users | 6 | 06-23-2008 04:28 AM |
| MailX | rajani_p | UNIX and Linux Applications | 0 | 10-23-2007 12:14 AM |
| CPU usage and memory usage | mansoorulhaq | High Level Programming | 1 | 08-09-2007 04:55 PM |
| mailx error message : mailx: NUL changed to @ | BG_JrAdmin | UNIX for Dummies Questions & Answers | 2 | 12-01-2005 10:27 AM |
| Monitor CPU usage and Memory Usage | Gajanad Bihani | High Level Programming | 2 | 03-09-2005 07:35 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
Mailx usage
Hi
Having the below four log files. logfile1 Code:
date time server ip 10/10/2008 10:10 ServerA xxx.xxx.xxx.xxx 10/10/2008 10:11 ServerA xxx.xxx.xxx.xxx 10/10/2008 10:12 ServerA xxx.xxx.xxx.xxx Code:
date time server ip 10/10/2008 10:10 ServerB xxx.xxx.xxx.xxx 10/10/2008 10:10 ServerB xxx.xxx.xxx.xxx 10/10/2008 10:10 ServerB xxx.xxx.xxx.xxx how to send mail using mailx i need to sent all the four files in one email i tried this... any one can suggest Code:
cat logfile1 >> logfile cat logfile2 >> logfile cat logfile3 >> logfile cat logfile4 >> logfile cat logfile | mailx -s 'Server logs for the day' xxx@xxx.com but i need like the below format Body of email ========== Code:
Server A Logs for the day =================== XXX XXX XXX Server B Logs for the day =================== XXX XXX XXX Server C Logs for the day =================== XXX XXX XXX Server D Logs for the day =================== XXX XXX XXX Thanks in advance |
|
||||
|
Or create them as attachments; the mail FAQ section has a script you can use.
PS. That was quite an orgy of useless cats. The purpose of cat is to catenate files. Even though it doesn't work, I need to point out that the Useful way to write your original command would have been Code:
cat logfile1 logfile2 logfile3 logfile4 | mailx -s 'Server logs for the day' xxx@xxx.com |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|