Sponsored Content
Top Forums Shell Programming and Scripting Mail the contents of a file in perl Post 302407744 by cillmor on Friday 26th of March 2010 09:36:42 AM
Old 03-26-2010
Script runs without error, mail is sent but the body is blank.
The log file is not empty, it just contains "This is email text".

If I run it under shell, for example:

Code:
#!/bin/sh
mail -s "PM_Logs" "cunningham.p@euro.apple.com" < /message.txt
exit 0

it runs fine (mail sent with content from message.txt) but under perl no luck.

thanks again for the help

Last edited by radoulov; 03-26-2010 at 10:43 AM.. Reason: Added code tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Looking for a perl script (windows) to delete the contents of a file

Hi All, Im having a file named logserver.txt. I want a perl script to take a backup of that file, along with the datestamp; move the file to a different location or empty the contents of the file after backup. Remember, the file gets generated when the related service starts. My condition is... (14 Replies)
Discussion started by: ntgobinath
14 Replies

2. Shell Programming and Scripting

PERL - copy fiel contents to array then compare against other file

Basically to illuminate i want to take a file with mutliple lines, C:\searching4theseletters.txt a b c Read this into an array @ARRAY and then use this to compare against another file C:\inputletters.txt b o a c n a (9 Replies)
Discussion started by: bradleykins
9 Replies

3. UNIX for Dummies Questions & Answers

Move contents of a directory into one file for e-mail distribution ...

Hello, Here is what I am trying to accomplish. I am going to have one directory in which there will be files of varying types (Excel, Word, PPT, and possible others), and I need to be able to be bundle however many files there are in there together in to one file to be used as an e-mail... (3 Replies)
Discussion started by: rip73
3 Replies

4. Shell Programming and Scripting

how to read the contents of a file using PERL

Hi My requirement is to read the contents of a fixed length file and validate the same. But am not able to read the contents of the file and when i tried it to print i get <blank> as an output... I used the below satatements for printing the contents ... (3 Replies)
Discussion started by: meva
3 Replies

5. Shell Programming and Scripting

Perl how to replace e-mail address from the file

I have a script which updates the users e-mail address according to wherever the users type in the browser. The script does other stuffs but this what i am struggling with ..lol. Basically, we are using the command below to try to update the e-mail, however since the e-mail address has "@" the perl... (2 Replies)
Discussion started by: cacm1975
2 Replies

6. Shell Programming and Scripting

Parse file contents in perl...

Hi, I have the file like this: #Contents of file 1 are: Dec 10 12:33:44 User1 Interface: Probe Dec 10 12:33:47 uSER1 SOME DATA Dec 10 12:33:47 user1 Interface: MSGETYPE Dec 10 12:34:48 user1 ID: 10. Dec 10 12:33:55 user1 Interface: MSGTYPE Dec 10 12:33:55 user1 Id: 9 ... (1 Reply)
Discussion started by: vanitham
1 Replies

7. Shell Programming and Scripting

Perl Help - Assigning variables to text file contents

I am looking to create a perl script which will take numbers from a simple text file, convert them from decimal to hex, and then rewrite those values in the file or create a new file with the hex numbers(whichever's easier). My text document for example would be something as simple as 1312... (6 Replies)
Discussion started by: samh785
6 Replies

8. Shell Programming and Scripting

New to Perl Mail @ sign search and replace in a file

HI I'm terribly new to perl .. I;ve been trying to use this command to search and replace entries in a file I tried this and it works perl -p -i -e 's/old/new/' filename Problem is that I have a list of email addresses and I need to serach and replace the entire email address as my... (5 Replies)
Discussion started by: mnassiri
5 Replies

9. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

10. Shell Programming and Scripting

Perl script for Calling a function and writing all its contents to a file

I have a function which does awk proceessing sub mergeDescription { system (q@awk -F'~' ' NR == FNR { A = $1 B = $2 C = $0 next } { n = split ( C, V, "~" ) if... (3 Replies)
Discussion started by: crypto87
3 Replies
GIT-MAILINFO(1) 						    Git Manual							   GIT-MAILINFO(1)

NAME
       git-mailinfo - Extracts patch and authorship from a single e-mail message

SYNOPSIS
       git mailinfo [-k|-b] [-u | --encoding=<encoding> | -n] [--[no-]scissors] <msg> <patch>

DESCRIPTION
       Reads a single e-mail message from the standard input, and writes the commit log message in <msg> file, and the patches in <patch> file.
       The author name, e-mail and e-mail subject are written out to the standard output to be used by git am to create a commit. It is usually
       not necessary to use this command directly. See git-am(1) instead.

OPTIONS
       -k
	   Usually the program removes email cruft from the Subject: header line to extract the title line for the commit log message. This option
	   prevents this munging, and is most useful when used to read back git format-patch -k output.

	   Specifically, the following are removed until none of them remain:

	   o   Leading and trailing whitespace.

	   o   Leading Re:, re:, and :.

	   o   Leading bracketed strings (between [ and ], usually [PATCH]).

	   Finally, runs of whitespace are normalized to a single ASCII space character.

       -b
	   When -k is not in effect, all leading strings bracketed with [ and ] pairs are stripped. This option limits the stripping to only the
	   pairs whose bracketed string contains the word "PATCH".

       -u
	   The commit log message, author name and author email are taken from the e-mail, and after minimally decoding MIME transfer encoding,
	   re-coded in the charset specified by i18n.commitencoding (defaulting to UTF-8) by transliterating them. This used to be optional but
	   now it is the default.

	   Note that the patch is always used as-is without charset conversion, even with this flag.

       --encoding=<encoding>
	   Similar to -u. But when re-coding, the charset specified here is used instead of the one specified by i18n.commitencoding or UTF-8.

       -n
	   Disable all charset re-coding of the metadata.

       -m, --message-id
	   Copy the Message-ID header at the end of the commit message. This is useful in order to associate commits with mailing list
	   discussions.

       --scissors
	   Remove everything in body before a scissors line. A line that mainly consists of scissors (either ">8" or "8<") and perforation (dash
	   "-") marks is called a scissors line, and is used to request the reader to cut the message at that line. If such a line appears in the
	   body of the message before the patch, everything before it (including the scissors line itself) is ignored when this option is used.

	   This is useful if you want to begin your message in a discussion thread with comments and suggestions on the message you are responding
	   to, and to conclude it with a patch submission, separating the discussion and the beginning of the proposed commit log message with a
	   scissors line.

	   This can be enabled by default with the configuration option mailinfo.scissors.

       --no-scissors
	   Ignore scissors lines. Useful for overriding mailinfo.scissors settings.

       <msg>
	   The commit log message extracted from e-mail, usually except the title line which comes from e-mail Subject.

       <patch>
	   The patch extracted from e-mail.

GIT
       Part of the git(1) suite

Git 2.17.1							    10/05/2018							   GIT-MAILINFO(1)
All times are GMT -4. The time now is 05:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy