sed s/something/multiple &/ don't get it..
An example :
"testfile" contains the line "this is a testfile."
#sed -n 's/test/&/p' testfile
#this is a testfile.
#
#sed -n 's/test/& &/p' testfile
#this is a test testfile.
#
#sed -n 's/test/& & &/p' testfile
#this is a test test testfile.
ALL in good order..or understanding at least..
Now :
#echo "test" | sed -n 's/test/&/p'
#test
#
#echo "test" | sed -n 's/test/& &/p'
#test st
#
#echo "test" | sed -n 's/test/& &/p'
#test st st
I don't get it anymore.. and I have tried. I just feel that this is something fundamentally easy, but I can't get my head around it.
|