Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!ceblair From: ceblair@ux1.cso.uiuc.edu (Charles Blair) Newsgroups: comp.unix.questions Subject: i command in sed - only one address? Message-ID: <1991Apr29.131718.26624@ux1.cso.uiuc.edu> Date: 29 Apr 91 13:17:18 GMT Organization: University of Illinois at Urbana Lines: 11 I would like to put a line before ranges in a file. Something like sed '/A/,/B/i\ INSERTED LINE' < file1 > file2 but when I try this, I get an error message saying ``only one address.'' Something like this seems to work when I insert a line before every line with an A in it (by using /A/ instead of /A/,/B/ ) Charles Blair