Re: [exim] resending messages

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Matt
Date:  
À: exim
Sujet: Re: [exim] resending messages
Steffen Heil wrote:

> Hi
>
> Sorry, I am not good at linux scripting, but if I use
>
> > for file in ls; do formail -s sendmail some@??? < $file; done
>
> I get:
>
> -bash: ls: No such file or directory
>
> and if I replace "ls;" with "*", i get:
>
> -bash: syntax error near unexpected token `<'
>


Personally, I like little shell scripts for stuff like this.

#!/bin/sh
#
email=$(ls $*)
#
{
for x in ${email};
do
sendmail some@??? < ${x};
done
}


Running is as simple as: /path/to/script /dir/to/list

Matt