tags:

views:

26

answers:

1

Appending can be done using tee command.

cat file | tee -a >> *

Is there a way to do a prepend/insertion? Thanks.

+1  A: 

Using sed might help

example:

sed -i.bak '3 r tmp1.txt' settings.xml 

will add the contents of tmp1.txt after line 3 in settings.xml (and create a backup file with the .bak extension)

Peter Tillemans