Re: [opensuse] Need some help with a script



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.

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages