i have a problem :rolleyes: i have write this script
**************************************
#!/bin/bash
#use command mail for send a mail present in a directory
# i repeat this for how many e-mail are stored in my directory
# count number of file in directory
nummail= ls | wc -l
while [$nummail -gt 0]
do
email=$(ls ./email/*.eml | more)
nummail=' expr $nummail-1'
mail -s "PROVA PROVA "Administrator@dominio.loc < $(email)
done
***************************
nummail i have the number of file in directory....but i don't know how i can extract the single name of file present in the directory and used in the var email in the command mail.and repeat for all the file in the directory
i hope i explain well the problem sorry for my English.
Thanks a lot.
P.S i'm not a spammer is for thesis at university :o