On 11/11/2011 10:28 PM, Regid Ichira wrote:
   I expected sed -i '$p;$d' to output the last line, 2 in this case;
and to delete that line from the file.

No, the output of "p" goes directly to the output file even with "sed -i". You should use "$w/dev/stdout" instead of "$p".

Paolo



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to