Email files with files - wild character


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Email files with files - wild character
# 1  
Old 01-16-2006
Data Email files with files - wild character

Dear friends:

I have these data files:

fileaa
fileab
fileac
filead

I want to email these file to someone. How can I email EACH SINGLE FILE with a wild card character?

mail john@mail.com<fileaa
mail john@mail.com<fileab
...............................ac
...............................ad

Please advise

Many Thanks!
# 2  
Old 01-16-2006
Data

I do:

mailx email@email.com<fileaa
mailx email@email.com<fileab
mailx email@email.com<fileac
mailx email@email.com<filead

How can write it in one line command that will do the 4 command above?

Than you much!
# 3  
Old 01-16-2006
cat file[a-z][a-z] | mailx -s "Test message" email@email.com
# 4  
Old 01-16-2006
Data

Dear friend:

I tried the command. It's only show me the subject line. No file was attached!!

I have x number of file in a folder and they are needed to be emailed out with attachment command mailx. How can I code it in 1 line:

filex
filey
filez

mailx email@mail.com<filex
mailx email@mail.com<filey
mailx email@mail.com<filez

mailx email@mail.com<[file**]???

please advise!
# 5  
Old 01-16-2006
Here is one syntax you can try...
Code:
(   echo "Your message goes here"
    for file in /path/to/file*
    do
        uuencode $file $(basename $file)
    done
) | mailx -s "Your Subject" email@mail.com

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Find wild card directory and its files of some extensions

I want to use Find command to find directories that have certain name and them find files in that directory having only some extensions. So far, I have come up with this command to list directories with wild card name and list ALL the files in that directory. find . -type d -name prog\* -print... (11 Replies)
Discussion started by: sssccc
11 Replies

2. UNIX for Dummies Questions & Answers

Unable to find files using wild card search

Hi All, My server is AIX and i am trying to search for a file in a specific path in directory. The file name can be of two types: Position_20131114.csv Position123333_20131114.csv I am trying to assign a SOURCEFILE variable as mentioned below:, but i am unable to find/locate the files... (2 Replies)
Discussion started by: abhi_123
2 Replies

3. Shell Programming and Scripting

list files not matching wild card

Hi I need a unix command which generates the list of files that dont match the wild card pattern in the current directory say for example I have files like x.addfd.txt.H2012.txt x.addfd.txt.H2012.txt x.asegfd.txt.H2012.txt adfd.bagddf I need the list of files which dont match... (4 Replies)
Discussion started by: lijjumathew
4 Replies

4. UNIX for Dummies Questions & Answers

How to use wild cards to find files beginning with upper and lower case

Im trying to use wild cards to find files that start with either an upper or lower case letter e.g. list files that beginning with b or B, i also want to sort them by the time they were last modified. e.g latest file created first. At the moment i have the following code that ls -d... (3 Replies)
Discussion started by: parker4001
3 Replies

5. Shell Programming and Scripting

Passing variable and wild card character to grep in Perl

HI All, I have a script that needs to find out a list of files in a directory, i pass the search parameter as an argument. opendir ( DIR, $dir ) || die "Error in opening dir $dirname\n"; @filename1 = (grep {/$File_pattern/ } readdir(DIR)); The problem is my file patterns are like... (1 Reply)
Discussion started by: amit1_x
1 Replies

6. HP-UX

Email files

How to delete old Emails from HP UX system? Thanks (2 Replies)
Discussion started by: ldaliosmane
2 Replies

7. Shell Programming and Scripting

Breaking a file into three new files, character by character

I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies

8. Shell Programming and Scripting

How to use wild card character in string concatenation--please help

Hi All, I'm new to shell scripting. Please help me in achieving this I am trying to a find regular expression that need to pick a file with begin with the below format and this code is called in xml file. currently the script accepts:... (0 Replies)
Discussion started by: vasavi_cherku
0 Replies

9. Programming

files and wild character

Hai, Can any one give idea how to display files by wildcharacter in c. If there is any function available it will very usefull for me. (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

10. Filesystems, Disks and Memory

character and block files

Hello, I want to write a process to catch data from my serial port, format it, and write it to a file that other processes can access just like any other file. My problem is I don't want to just append the data to a file because of the disk space required. I would rather the data be available... (1 Reply)
Discussion started by: PCk
1 Replies
Login or Register to Ask a Question