The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-02-2008
hpuxlxboy hpuxlxboy is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 4
Post How to copy a string to a text file

I am using the following command to email a tex file as an attachment-

cat mailtext.txt | elm -s "Subject" emailAddr
where content of mailtext.txt is -
"Body of email"
[include foo.txt text/plain base64]

This will attach foo.txt with the email.

My problem is that the file foo.txt is ceated dynamically everytime with a timestamp. e.g. foo_<timestamp>.txt

So if this filename is collected in a variable-
sFileName = foo_<timestamp>.txt

How do I include this filename dynamically in the mailtext.txt file?

Any help would be appreciated.

Thanks.