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 [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to