René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

Using sed to insert a line before a pattern

Inserts a 4 before the 5:
echo '1
2
3
5' | sed '/5/i\
4'