Sed ' content added 1i ' File # string which is added before the first row Sed ' content to add $ i ' File # string which is added before the last rows Sed ' content to add $ a ' File # This add the string after the last rows sed -i ' S & /.*/ line by adding content adding content end of the line / ' filename // each line sed -i ' $ a new line of ' tars_build_tar. SH