help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing duplicated lines


From: Yuri Khan
Subject: Re: Removing duplicated lines
Date: Thu, 29 Nov 2012 17:31:58 +0600

On Thu, Nov 29, 2012 at 6:06 PM, Sebastien Vauban
<wxhgmqzgwmuf@spammotel.com> wrote:
>> Does (vanilla) Emacs have some command for removing duplicated lines
>> in a given region?
> Shell command on a region: `M-| uniq RET'

+1 but I’d add that it will only detect consecutive duplicate lines.
sort|uniq or sort -u will remove all duplicates but will sort the
lines as a side effect, which may or may not be desired.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]