Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Cant get message body Post 302771760 by Junaid Subhani on Thursday 21st of February 2013 12:27:50 PM
Old 02-21-2013
Reference [Solved] Cant get message body

Hi guys . I am trying to take the output of top command and mail it to myself . The code is :

Code:
echo ##############################################################

/usr/local/bin/top c n 1 b >> /export/home/top-output.txt
echo ##############################################################


WT_TO=`tail -22 /export/home/top-output.txt`


cat $WT_TO | mailx -s "Top Command OutPut" myemail@address.com

The body is empty ! Whereas if i open the txt file , I do get an output.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sendmail message body buffer limit?

when sending the contents of a ascii file to the body of an email then sending it off. it seems sendmail is breaking up the lines with a "!" thus ruining the data. Has this ever happened to anyone? i am guessing there is a line buffer limit in either the mail command or in sendmail itself. ... (3 Replies)
Discussion started by: Optimus_P
3 Replies

2. UNIX for Dummies Questions & Answers

How to get åäö in e-mail message body

First of all: Hi all, i´m a new unix user and i´m swedish so please bare with me. When i generate an e-mail on a unix server and send it through novell netware 5, i loose the swedish characters å, ä and ö in the body of the message, however they remain in the subject row. What to do? Anyone?... (4 Replies)
Discussion started by: de98luto
4 Replies

3. UNIX for Dummies Questions & Answers

AIX send mail with HTML message body and a binary attachment

I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements: 1. command line switch to specify file name containing message body in HTML format 2. command line switch to specify file name of a binary attachment 3. command line or input file to specify... (4 Replies)
Discussion started by: G-Man
4 Replies

4. Shell Programming and Scripting

mailx: concatenating strings for message body (KSH)

Hi all, Think this is a pretty simple problem, but I've been thinking about it for a few days. Let's say that I'm going to have to output the contents of a file as the body of a mailx message. I'll probably do this: cat <filename> | mailx <extra commands> However, how do I go about doing... (1 Reply)
Discussion started by: rockysfr
1 Replies

5. Shell Programming and Scripting

perl/mail - inserting file text in message body

I've got the following code sub mail_report { $Mailer = '/usr/sbin/sendmail joe@somewhere.net'; open MAIL,"|$Mailer"; print MAIL "Subject: $X connection attempt \n"; open MESSAGE, "<$outdir$X"; print MESSAGE '$outdir$X\n'; close MESSAGE; close MAIL; } #End... (2 Replies)
Discussion started by: thumper
2 Replies

6. Shell Programming and Scripting

How to send a mail with attachement as well as message Body..?

Hi all, i am working with CSH, i want to know that how to send a mail in UNIX shell script (CSH) with attachment as well as message body. i know that how to send a mail with attachment and message body. but i want know both things in a single mail Suggession would be appreciate. ... (1 Reply)
Discussion started by: psiva_arul
1 Replies

7. UNIX for Dummies Questions & Answers

Mailx empty body message

Hi, Is there a way to suppress this message? Null message body; hope that's ok My email string is: mailx -s "This is my subject" myemail@domain.com < /dev/null It's just an annoyance to me that I would like see go away. (3 Replies)
Discussion started by: bbbngowc
3 Replies

8. Shell Programming and Scripting

Mailx with attachment and message body

i have to attach the 'body in the email' along with attachment below code is throwing errors, how can i do it ? here body file contains message, it should display in email, please help i am using HP-UX (cat body ;) (uuencode attch1 attch1 ;) | mailx -m -s "testing" "abc@gmail.com" ... (4 Replies)
Discussion started by: only4satish
4 Replies

9. Shell Programming and Scripting

Message Body while sending an email

I am making use of the following code to display the results of my txt file in an email: mail -s 'Count Validation Test Comparison Results' Ronit@XYZ.com < Count_Validation_Results_`date +%m%d%Y`.txt Email Output: ----------Query 1 Count Validation Results-------- Source count is 4 Target... (7 Replies)
Discussion started by: ronitreddy
7 Replies

10. Red Hat

Sending email with message body and attachment

Hello experts!! I am trying to send an email with message body and attachment.but i am getting any one like message body or attachment. I tried below command: (echo "subject:test";echo "MIME-Version: 1.0";echo "content-transfer-encoding:base 64";echo "content-type:txt;name=test.txt";cat... (2 Replies)
Discussion started by: Devipriya Ch
2 Replies
gedit(1)							   User Commands							  gedit(1)

NAME
gnome-text-editor, gedit - Text Editor for the GNOME desktop. SYNOPSIS
gnome-text-editor | gedit [--encoding=encoding] [--new-document] [--new-window] [+[num]] [gnome-std-options] [filename] DESCRIPTION
gedit or gnome-text-editor is the official text editor of the GNOME desktop environment. While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor. It can be used to create and edit all kinds of text files. Multiple documents can be edited at the same time. Each document resides in a specific tabbed section of the application win- dow. gedit features a flexible plugin system which can be used to dynamically add new advanced features to gedit itself. OPTIONS
The following options are supported: --encoding=encoding Set the character encoding to be used to open the files listed on the command line. --new-document Create a new top-level document or tabbed section in an existing instance of gedit. --new-window Create a new top-level window in an existing instance of gedit. +[num] For the first file, go to the line specified by num (do not insert a space between the "+" sign and the number). If num is missing, go to the last line. gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more information. OPERANDS
The following operands are supported: filename The name of the image file to edit. EXTENDED DESCRIPTION
The gedit application accepts pipes, so you can specify a pipe after another command, to load the output of the command into gedit. For example: example% ls -l | gedit EXAMPLES
Example 1: To Edit an ASCII File Named document.txt example% gedit document.txt Example 2: To Add a New Tab That Contains an ASCII File Named book.txt example% gedit --new-document book.txt Example 3: To Add a New Top-Level Window That Contains an ASCII File Named testfile.txt example% gedit --new-window testfile.txt EXIT STATUS
The following exit values are returned: 0 Application exited successfully. >0 An error occurred. FILES
The following files are used by this application: /usr/bin/gedit The executable file for the gnome-text-editor application. /usr/bin/gnome-text-editor A symbolic link to the gedit executable file. /usr/lib/gedit/plugins Location of gedit plugins. /usr/share/gtk-doc/html/gedit Location of developer documentation for writing a gedit plugin. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-text-editor | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
libgtksourceview-1.0(3), attributes(5), gnome-std-options(5) Online Help gedit manual. NOTES
This man page was written by the following people: Paolo Maggi, Paolo Borelli, Chema Celorio, James Willcox, Federico Mena Quintero. Updated by Brian Cameron, Sun Microsystems Inc., 2003, 2004, 2006. SunOS 5.11 31 Aug 2004 gedit(1)
All times are GMT -4. The time now is 09:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy