Re: [1/2OT] something about sed

2012-02-27 Thread Bob Proulx
lina wrote: Bob Proulx wrote: Lina, I am dissappointed and hurt that my messages aren't of high enough quality to make the cut for your reading. What may I do to improve them? :-) Oh Bob, I am terribly wrong (haha ... I am kidding here. gotta be serious. please don't be disappointed and

Re: [1/2OT] something about sed

2012-02-27 Thread lina
On Monday 27,February,2012 04:49 PM, Bob Proulx wrote: lina wrote: Bob Proulx wrote: Lina, I am dissappointed and hurt that my messages aren't of high enough quality to make the cut for your reading. What may I do to improve them? :-) Oh Bob, I am terribly wrong (haha ... I am kidding

[1/2OT] something about sed

2012-02-26 Thread lina
Hi, sorry a bit off-topic, sed -e 's/\([^ ]*\)\([ ]*\)\([^ ]*\)/\3\2\1/g' GNU Linux is cool Linux GNU cool is I don't know why $ echo GNU linux is cool | sed -e 's/\([^ ]*\)\([ ]*\)\([^ ]*\)/\3\2\1/g' GNU linux is cool It doesn't work. Thanks for any suggestions, Best regards, -- To

Re: [1/2OT] something about sed

2012-02-26 Thread Javier Barroso
On Sun, Feb 26, 2012 at 4:30 PM, lina lina.lastn...@gmail.com wrote: Hi, sorry a bit off-topic, sed -e 's/\([^ ]*\)\([ ]*\)\([^ ]*\)/\3\2\1/g' GNU Linux is cool Linux GNU cool is No here ... I don't know why $ echo GNU linux is cool | sed -e 's/\([^ ]*\)\([ ]*\)\([^ ]*\)/\3\2\1/g'

Re: [1/2OT] something about sed

2012-02-26 Thread Allan Wind
On 2012-02-26 23:30:55, lina wrote: $ echo GNU linux is cool | sed -e 's/\([^ ]*\)\([ ]*\)\([^ ]*\)/\3\2\1/g' GNU linux is cool What is it that you are trying to do? The regex is looking for optional non-spaceoptional spaceoptional non-space and as there are no in the input nothing

Re: [1/2OT] something about sed

2012-02-26 Thread lina
On Monday 27,February,2012 12:14 AM, Javier Barroso wrote: On Sun, Feb 26, 2012 at 4:30 PM, linalina.lastn...@gmail.com wrote: Hi, sorry a bit off-topic, sed -e 's/\([^ ]*\)\([ ]*\)\([^ ]*\)/\3\2\1/g' GNU Linux is cool Linux GNU cool is No here ... I don't know why $ echo GNU linux is

Re: [1/2OT] something about sed

2012-02-26 Thread lina
On Monday 27,February,2012 12:16 AM, Allan Wind wrote: On 2012-02-26 23:30:55, lina wrote: $ echo GNU linux is cool | sed -e 's/\([^ ]*\)\([ ]*\)\([^ ]*\)/\3\2\1/g' GNU linux is cool What is it that you are trying to do? The regex is looking for It's an example from a book. I just clumsily

Re: [1/2OT] something about sed

2012-02-26 Thread Bob Proulx
lina wrote: Javier Barroso wrote: or using extended regular expressions, you can remove all escape stuff : sed -re 's/([^ ]+)( +)([^ ]+)/\3\2\1/g' Ha ... I didn't realize the -r can be used. sed -re 's/([^ ]+) ([^ ]+) ([^ ]+)/\3 \2 \1/g' Lina, I am dissappointed and hurt that my messages

Re: [1/2OT] something about sed

2012-02-26 Thread lina
On Monday 27,February,2012 03:45 AM, Bob Proulx wrote: lina wrote: Javier Barroso wrote: or using extended regular expressions, you can remove all escape stuff : sed -re 's/([^ ]+)( +)([^ ]+)/\3\2\1/g' Ha ... I didn't realize the -r can be used. sed -re 's/([^ ]+) ([^ ]+) ([^ ]+)/\3 \2