1

Want to Insert few lines which are stored in some file before a pattern in another file

view story
linux-howto

http://www.unix.com – Hello, I have few lines to be inserted in file_lines_to_insert. In another file final_file, I have to add lines from above file file_lines_to_insert before a particular pattern. e.g. $ cat file_lines_to_insert => contents are abc def lkj In another file final_file, before a pattern "PIN (new)", I want to insert above file contents. Pl. tell me how to do it with sed command if possible. (HowTos)