sed -n '/string/,$p' file >> otherfile to copy text from a line with certain string to another file.
Now I want the copied text to be deleted in the original file. I tried different methods with sed and awk but nothing worked.
How to use sed to delete the text of a file from the beginning line with a certain string in it?
texta texta1 textb <- string, delete rest of the text from here textb1 textc textc1
or would it be easier to cut instead of copying with sed and what would be the command instead?