procmail
[Top] [All Lists]

Re: character substitution in $VARIABLE

2003-11-07 08:45:41
On Fri, Nov 07, 2003 at 02:30:52PM +0000, Ian Prideaux wrote:
Lukreme wrote:

Simple, use sed

sed s/\./-/g

(eg: users-lists-freeswan-org) preferably without using sed.


tr '.' '-'

The tr executable is about 60% the size of the sed executable, whether 
tr is quicker or requires less memory space I don't know.

Asked I might have said the same thing... but: 

ls -l `which sed` `which tr`
-rwxr-xr-x    1 root     root        21132 Jul  4  2001 /bin/sed*
-rwxr-xr-x    1 root     root        24056 Jul 12 09:54 /usr/bin/tr*

But again, these are your tools... unless you want to write a quicke
perl script, but that's even more overhead.

-- 
Till Later, Jake <karrde+procmail(_at_)viluppo(_dot_)net>
-----------------------------------------------
Direct replys are likley to be flagged as spam.
Drop the +addy if you need to reply direct.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>