Just use ed. Ctrl+C. Easy.