How can I a command at the beginning of every line example -
My file contains following text -
abc
efg
hij
So I want to add this sed -n '/^<<</,/^>>>/p'
i.e.
sed -n '/^<<</,/^>>>/p' abc
sed -n '/^<<</,/^>>>/p' efg
sed -n '/^<<</,/^>>>/p' hij
I tried to run this command
sed -i 's/^/sed -n '/^<<</,/^>>>/p'' test.txt
but it did not work.
Can someone help here ?