The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
reading ,writing,appending ,manipulating a file. szchmaltz UNIX for Dummies Questions & Answers 4 06-17-2008 03:02 AM
Reading a file and writing the file name to a param file. thebeginer UNIX for Advanced & Expert Users 1 10-05-2007 05:38 PM
reading/ writing to sockets rein Shell Programming and Scripting 1 09-20-2007 09:57 PM
Reading and Writing file on LAN lucky001 High Level Programming 3 03-30-2007 03:16 PM
Reading and Writing Files ? tracydp UNIX for Dummies Questions & Answers 3 08-30-2006 11:24 AM

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

Join Date: Sep 2008
Location: Bristol , United Kingdom
Posts: 38
Command looks right , try with "-e" option and see the exit status of mailx if there is any information. Also see man page of mailx
  #2 (permalink)  
Old 11-26-2008
valluvan valluvan is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 27
Hi,
There was some problem which the admin corrected and i am getting the mails now.however there is a slight problem


Code:
 
echo -e "$FTPERROR1" "\n" "$FTPERROR2" "\n" "$MAILFOOTER" | mailx -s "$MAILSUBJECT" $EMAILADD

Is the code i am using for email.
I want to have a new line after $FTPERROR1 and $FTPERROR2.But it does'nt print a new line.Instead it prints "\n"

I have searched the forums and could'nt find anything that addresses this.can u please help?

Thanks
  #3 (permalink)  
Old 11-26-2008
mk1216 mk1216 is offline
Registered User
  
 

Join Date: Sep 2008
Location: Bristol , United Kingdom
Posts: 38
You could try without double codes , however the command you have shown worked for me .
  #4 (permalink)  
Old 11-26-2008
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131

Code:
printf "${FTPERROR1}\n${FTPERROR2}\n${MAILFOOTER}" | mailx -s "${MAILSUBJECT}" "${EMAILADD}"

Closed Thread

Bookmarks

Tags
shell script, shell scripting, unix scripting, unix scripting basics

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 06:09 AM.


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