Linux commands: Append or insert string into file