C:\Users\username>type afile.txt half a pound of tuppenny rice half a pound that's the way the money goes pop goes the weasel C:\Users\username> C:\>sed "4i\of treacle" afile.txt half a pound of tuppenny rice half a pound of treacle that's the way the money goes pop goes the weasel C:\>
you can use sed "3a\of treacle" afile.txt
i inserts before that line. 4i would be before line 4. a inserts after that line. 3a would be after line 3. so, 3a is the same as 4i.