Re: How to control the email file name procmail produces

Ed Blackman <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
On Fri, Jan 28, 2011 at 09:06:25AM -0800, Professional Software Engineering wrote:
>At 06:07 2011-01-28, Michelle Konzack wrote:
>>you can follw the tips of LuKreme and Sean but IF YOU REALY need the
>>messages on a Windows system, you can use TRAP to rename it using
>>
>>    TRAP='rename "s|:2|_2|" ${LASTFOLDER}'
[...]
>Next, surely you mean the 'mv' command - 'rename' is a dos-ism.

rename is a perl script, and is installed by default as part of the base 
Perl install (as /usr/bin/rename) by a lot of Debian-based Linux 
distros.  It takes a Perl expression and a list of files, renaming those 
files according to the results of evaluating the expression.

As a trivial example, 'rename "s/foo/bar/" *.c' would replace 'foo' with 
'bar' in the names of all the .c files in the current directory.  
But because it's a Perl expression, it gives you a lot of flexibility.

Ed

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
signature.txt (application/pgp-signature, 190 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFNQwlv3nrUNJhVPs4RAgqBAJ96qmOODn+DjrjkS7LlPWrqVwec4gCePjMq
VNqSloZ4qvg1TMXPxhCFOlE=
=sd1G
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.