I expected sed -i '$p;$d' to output the last line, 2 in this case; and to delete that line from the file.
--- On Thu, 11/10/11, Paolo Bonzini <[email protected]> wrote: > From: Paolo Bonzini <[email protected]> > Subject: Re: Bug#648344: sed -i '$p;$d' doesn't work > To: "Regid Ichira" <[email protected]>, [email protected] > Cc: [email protected] > Date: Thursday, November 10, 2011, 7:22 PM > On 11/10/2011 06:55 PM, Regid Ichira > wrote: > > Package: sed > > Version: 4.2.1-9 > > Severity: normal > > > > I expected sed -i '$p;$d' to work. > It doesn't. > > sed -n '$p;$p' does work. > > The result is correct, but you're not saying what you > expect so we > cannot help. > > Paolo > -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

