Arthur Bela wrote: > i just can't figure it out, how to "sed" when having several lines > [nor in awk, perl..] I have not really understood your question, but maybe this will help you: http://www.grymoire.com/Unix/Sed.html#uh-51 I would go someway along the lines of removing the newline at the end, then replacing the full expression. Johannes