sed -i -e 's_.*_text-to-be-insterted-on-each-line&_' '/media/root/<filename>'
works well and is concise and clean like i prefer.....but i dont / cant find ANY information about the ninja commands used - not in manual nor google.
- sed = Stream EDitor
- -i = in-place (i.e. save back to the original file)
- The command string:
- s = the substitute command
but im having trouble understanding from example how _.*_
is translated
and how &_ is being used exactly &_
is being used
if someone could explain GREAT or any resources that document these unique sed commands?