5 Feb
2009
5 Feb
'09
18:04
On Wednesday 04 February 2009 02:25, nordi wrote:
I wrote:
I think the whole script could also be replaced with a big pipe of "sed"
Yes, it can:
cat the_file | tr '\n' ' ' | sed -r 's/---------- [[:alpha:]]+ said:/EVILSEPERATOR/g; :found; s/EVILSEPERATOR (.+) EVILSEPERATOR (.+)/\2EVILSEPERATOR \1/;tfound;s/EVILSEPERATOR//'
It will work with the example data that I provided in the last post, assuming it is saved as "the_file".
Have a lot fun understanding it *g* nordi
-- Spam protection: All mail to me that does not contain the string "suse" goes to /dev/null.
This works.. (sort of...) It removes all cr/lf tho.. So i get a VERY long text on one line.... almost 300.000 characters long.... -- /Rikard Johnels