Well, it's not exactly a "script" but
lam(1) works for this.
Code:
$ cat file.txt
1
3
4
$ echo "\n 2" | lam file.txt -
1
3 2
4
$
It should be worth noting that lam(1) is probably a BSD thing, it's not mentioned in the SUS/POSIX specifications..
paste(1) may be the standards alternative.