Re: [1/2OT] something about sed
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-space>optional space<optional non-space>
and as there are no <> in the input nothing matches. The -n
argument to sed quite useful to see this in which case you use
the p command to print what matches.
Life Integrity, LLC