A Linux textbook covering sed command gives me an example as follow:
sed -e 's/\(<[^ ]*>\)\([ ]*\)\(<[^ ]*>\)/\3\2\1/g'
GNU Linux is cool
Linux GNU cool is
but while I typing exactly the same command as the about one, it shows me:
sed -e 's/\(<[^ ]*>\)\([ ]*\)\(<[^ ]*>\)/\3\2\1/g'
GNU Linux is cool
GNU Linux is cool
Anyone can help me solve this? I'm using Ubuntu 12.04LTS. Many thanks.
echo "GNU Linux is cool" | sed ...
- They're doing it interactivly above but echo/pipe is quicker for testing.