LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 10-13-2011, 09: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, 02:18 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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, 09: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



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 08:19 PM
Way To Have Output Of Cron Job Emailed jmoschetti45 Linux - General 1 05-22-2007 01:42 AM
Logs - get them emailed to me yogaboy Linux - General 2 02-19-2007 08:02 AM
non LQ user emailed me thru LQ! titanium_geek LQ Suggestions & Feedback 8 11-12-2006 10:52 AM
Is there a way to get log files emailed? Pcghost Linux - General 2 02-20-2003 01:03 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration