On Fri, 19 Feb 2016 10:13:36 -0600 (CST)
"Jeremy C. Reed" <r...@reedmedia.net> wrote:
> Sorry I don't see how that could possibly work. How do you define
> FROM and TO? In my case it is multiple lines of text that may contain
> slash / and metacharacters like . and * for example. It would need to
> be fully escaped. But I may want to use some regex -- so I don't want
> all escaped.
> 
i respond to your mail server at the bottom (you should fix that :) ) 

i don't usually rise to bait, as i am not a fish, but well, it is Saturday and 
I do have a minute so here goes:

hmm, it does more than you even asked for as it does multi file as well as 
multi line replacement :)  I  haven't specifically tested it, but there is no 
reason why it should not work though, but let me write the
whole thing for you real quick, so you can copy & paste :)

--------------------------------------------------
#!/bin/bash
FROM="something"
TO="else"
LST=`find ./ -name '*.php`
for FILENAME in "$LST"; do
        sed -i -e "s/$FROM/$TO/g" $FILENAME
done
---------------------------------------------------

You can change the LST to * or to a single specific file : mail.log or to 
whatever your heart desires :)

In From and To, you can also escape characters, ymmv, add for - to for 
additional characters, awk, etc etc.  

> > <r...@reedmedia.net>: host mail.reedmedia.net[64.85.162.118] said:
> > 550 Invalid email (in reply to end of DATA command)
> 
> Because of:
> 
>   rejected after DATA: RFC compliant Message-Id required
> 
RFC: Message-ID is not a mandatory header - You must/should not bounce
email based on the lack thereof?

so, is your email server mis-configured? - you may also, while you are
busy, change the oil and check the pressure on the tires :)

Regarding the message id :: I specifically do not send it :)
(you can ask my why if you really really want to :) )

> (Looking at this list email, I assume you didn't provide one so the 
> list's mail server added one for you. The normal behavior is to pass
> it along unchanged.)

normal? hahahaha, you need people like me, that think outside containers :)


Reply via email to