Ever wanted to add something to the top of a file in UNIX? Say, the date? You could: ex - file << END %!date && cat w END Blammo! The date is now at the top of file. Isn't that nicer than: date >> newfile && cat file >> newfile && mv newfile file So, if you want to add text (rather than the output of a command such as date): ex - file << END %!echo "This is a lot of text to add" && cat w END