LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 10-13-2011, 10:29 AM   #1
rajsp217
LQ Newbie
 
Registered: Jun 2011
Posts: 12

Rep: Reputation: Disabled
Question emailed file name is changed to V


Hi,
OS: Solaris 10

I am writing a script to email a file to my email id.
instead of each time trying to type whole command, I want just enter file name then it should email me that file as attachment. Following is the script.
============================================
echo "Script to email a file"
echo "Enter file name :\c"
read FILENAME

echo "emailing $FILENAME"

uuencode $FILENAME $FILENAME | mailx -s "$V_FILENAME" xyz@abc.com

echo "file has been emailed"
=======================================

I need help your help...


Thx,
Raj
 
Old 10-13-2011, 03:18 PM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Looking at your problem..................
Code:
uuencode $FILENAME $FILENAME | mailx -s "$V_FILENAME" xyz@abc.com
You are using $FILENAME the whole time, but for some reason, you are using $V_FILENAME within your mailx command. You need to change that........................
 
Old 10-17-2011, 10:18 AM   #3
rajsp217
LQ Newbie
 
Registered: Jun 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by corp769 View Post
Looking at your problem..................
Code:
uuencode $FILENAME $FILENAME | mailx -s "$V_FILENAME" xyz@abc.com
You are using $FILENAME the whole time, but for some reason, you are using $V_FILENAME within your mailx command. You need to change that........................


Thanks, it resolved the issue.


Raj
 
  


Reply

Tags
corrupted


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing mpegs so they can be emailed thedoctor Linux - Newbie 1 02-01-2010 09:19 PM
Way To Have Output Of Cron Job Emailed jmoschetti45 Linux - General 1 05-22-2007 02:42 AM
Logs - get them emailed to me yogaboy Linux - General 2 02-19-2007 09:02 AM
non LQ user emailed me thru LQ! titanium_geek LQ Suggestions & Feedback 8 11-12-2006 11:52 AM
Is there a way to get log files emailed? Pcghost Linux - General 2 02-20-2003 02:03 PM


All times are GMT -5. The time now is 08:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration