Sed problem
I am new to Linux and I am currently trying to learn sed. After executing this command I am little confuse
echo "123 abc" | sed 's/[0-9]/& &/' output 1 123 abc why it is not "1 1 abc" as & remember matched pattern. Please explain me. |
Change it to this and see if that explains it
Code:
echo "123 abc" | sed 's/[0-9]/---> & <---/' |
or even:
echo "123 abc" | sed 's/[0-9]/---> & <---> & <---/' |
All times are GMT -5. The time now is 11:02 PM. |