|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have script which send a mail with top output. The script look like
$ cat health.sh #!/bin/sh maillist="email address" rm /home/rtq1/file top -n 1 | head 15 > file cat file | mailx -s "Daily Health Report from `hostname` ..." "${maillist}" But now i am getting some junk characters along with the output in mail. If I open file in vi, it is showing with junk characters ^[[H^[[2J^[[m^[(Btop - 02:27:57 up 24 days, 3:16, 1 user, load average: 0.31, 0.33, 0.28^[[m^[(B^[[39;49m^[[K Tasks:^[[m^[(B^[[39;49m^[[m^[(B 142 ^[[m^[(B^[[39;49mtotal,^[[m^[(B^[[39;49m^[[m^[(B 1 ^[[m^[(B^[[39;49mrunning,^[[m^[(B^[[39;49m^[[m^[(B 139 ^[[m^[(B^[[39;49msleeping,^[[m^[(B^[[39;49m^[[m^[(B 2 ^[[m^[(B^[[39;49mstopped,^[[m^[(B^[[39;49m^[[m^[(B 0 ^[[m^[(B^[[39;49mzombie^[[m^[(B^[[39;49m^[[K I have tried this also top -n 1 | mailx -s "Daily Health Report - `hostname` ..." "${maillist}" But no luck Please help me to sort out this Regards, Renjesh Raju |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
13 - unlucky for some
You have had 12 reminders and / or infractions, and still you can't use simple code tags.
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mailx Emails are going to Junk, How to stop them? | karumudi7 | Shell Programming and Scripting | 3 | 09-07-2011 05:40 AM |
| Handling Junk Characters | help_scr_seeker | Shell Programming and Scripting | 3 | 07-06-2011 11:22 AM |
| Replacing junk characters | ashwin3086 | Shell Programming and Scripting | 16 | 07-13-2010 11:35 AM |
| finding junk characters | ashwin3086 | Shell Programming and Scripting | 20 | 06-30-2010 09:16 AM |
| junk characters in ls -l output in solaris10 | ragtechy | Solaris | 7 | 04-07-2009 08:09 AM |
|
|