The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
mail problem markms UNIX for Dummies Questions & Answers 1 04-06-2006 12:05 PM
mail problem Blip OS X (Apple) 4 02-12-2004 03:36 AM
Problem with mail. Colf UNIX for Dummies Questions & Answers 3 07-25-2002 05:04 PM
Problem with mail Colf UNIX for Dummies Questions & Answers 2 07-22-2002 01:47 AM
mail problem (NOT Mail or Mail.app) chenly UNIX for Dummies Questions & Answers 1 05-29-2002 12:59 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-21-2008
ali560045's Avatar
ali560045 ali560045 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 328
problem with Mail !

I have a o/p file called a1.txt from a script. I m mailing this file but the problem is that in the mail the format is comming different.

Contents of a1.txt
------------------------------------
Meter 090845086LG is now Made AMR Active
Meter 090845088LG is now Made AMR Active
Meter 092276519LG is now Made AMR Active
Meter 090764350LG is now Made AMR Active
Meter 090707594LG is now Made AMR Active
Meter 090764331LG is now Made AMR Active
Meter 090764330LG is now Made AMR Active
Meter 090764334LG is now Made AMR Active
Meter 090764335LG is now Made AMR Active
Meter 090707591LG is now Made AMR Active
------------------------------------------------

contents in the mail:
----------------------------------------------
Meter 090845086LG is now Made AMR Active Meter 090845088LG is now Made AMR Active Meter 092276519LG is now Made AMR Active Meter 090764350LG is now Made AMR Active Meter 090707594LG is now Made AMR Active Meter 090764331LG is now Made AMR Active Meter 090764330LG is now Made AMR Active Meter 090764334LG is now Made AMR Active Meter 090764335LG is now Made AMR Active Meter 090707591LG is now Made AMR Active
----------------------------------------------------------------------

but my desired o/p should be same as in the file a1.txt

below the command i used for mailing

mail - s "AMR Active" abcd@gmail.com < a1.txt

plz help me in this ?
  #2 (permalink)  
Old 11-21-2008
sharadpisal sharadpisal is offline
Registered User
  
 

Join Date: May 2008
Posts: 28
It works well for me, i.e. mail content and file content are same , including newlines.

can you tell us version and platform you are using ?
  #3 (permalink)  
Old 11-21-2008
ali560045's Avatar
ali560045 ali560045 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 328
I m using IBm AIX 3.5
  #4 (permalink)  
Old 11-21-2008
shahnazurs shahnazurs is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 59
First you use the following command

unix2dos a1.txt a1.txt

then you execute your snippet, let me know the result.

Thanks,
Shahnaz.
  #5 (permalink)  
Old 11-21-2008
n3vin n3vin is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 1
Hi

if you make a new line after each line it solves the problem
like

Meter 090845086LG is now Made AMR Active

Meter 090845088LG is now Made AMR Active

Meter 092276519LG is now Made AMR Active

etc ...
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0