Re: [opensuse] Need some help with a script
- From: nordi <nordi@xxxxxxxxxxxx>
- Date: Wed, 04 Feb 2009 02:25:15 +0100
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
- Follow-Ups:
- Re: [opensuse] Need some help with a script
- From: Rikard Johnels
- Re: [opensuse] Need some help with a script
- References:
- [opensuse] Need some help with a script
- From: Rikard Johnels
- Re: [opensuse] Need some help with a script
- From: nordi
- [opensuse] Need some help with a script
- Prev by Date: Re: [opensuse] Nokia 6680 synchronisation problem (segfault)
- Next by Date: Re: [opensuse] Who is using Gnome?
- Previous by thread: Re: [opensuse] Need some help with a script
- Next by thread: Re: [opensuse] Need some help with a script
- Index(es):
Relevant Pages
|