View Single Post
  #3   (View Single Post)  
Old 6th November 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

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.
Reply With Quote