دہری سطریں ہٹانے والا

استعمال کا طریقہ 3 مراحل
  1. اپنی سطریں چسپاں کریں۔
  2. کون سی کاپی رکھیں کرنی ہے اور نتیجے کی ترتیب چنیں، ساتھ خالی جگہ اور خالی لائنوں کے اختیارات بھی۔
  3. دہری سطریں ہٹائیں دبائیں، پھر کاپی کریں۔
منفرد سطریں

یہ ٹول کیسے کام کرتا ہے

ہر سطر کو موازنے کی ایک کلید میں سمیٹ دیا جاتا ہے اور فہرست پر چلتے ہوئے ان کلیدوں کا حساب رکھا جاتا ہے۔ جس سطر کی کلید پہلے دیکھی جا چکی ہو وہ نقل ہے۔ اختیارات کلید ہی کو بدلتے ہیں: کترنا آگے پیچھے کی خالی جگہ نظر انداز کرتا ہے، اور چھوٹے بڑے حروف نظر انداز کرنا موازنے سے پہلے سب کچھ چھوٹے حروف میں ڈھال دیتا ہے۔ جو سطر رکھی جاتی ہے وہ ہمیشہ ویسی ہی لکھی جاتی ہے جیسی آپ نے لکھی تھی — اختیارات یہ طے کرتے ہیں کہ کیا ایک جیسا شمار ہو، یہ نہیں کہ آؤٹ پُٹ کیسا نظر آئے۔

پہلا موقع رکھنے سے آپ کی اصل ترتیب برقرار رہتی ہے۔ آخری رکھنے سے ہر بچی ہوئی سطر اپنے آخری ظہور کی جگہ پر چلی جاتی ہے، جو اس وقت اہم ہے جب بعد والی نقل ہی درست شدہ ہو۔ اگر آپ کہیں تو حروفِ تہجی کے مطابق ترتیب نقل ہٹانے کے بعد لگتی ہے اور مقامی زبان سے واقف موازنہ استعمال کرتی ہے، اس لیے اعراب والے حروف وہیں آتے ہیں جہاں اس زبان کا پڑھنے والا توقع کرے، Z کے بعد نہیں۔

وہ تفصیلات جو حیران کن گنتی کی وضاحت کرتی ہیں

  • موازنہ پوری سطر کا ہوتا ہے: دو سطریں جو صرف آخر میں ایک خالی جگہ کے فرق سے مختلف ہوں، الگ سطریں ہیں جب تک کترنا آن نہ ہو۔ عام طور پر یہی وجہ ہے کہ نقل ہٹی ہوئی نظر آنے والی فہرست میں پھر بھی جوڑے رہ جاتے ہیں۔
  • ہٹائی گئی خالی سطریں بھی حذف شدہ میں گنی جاتی ہیں: حذف شدہ کا عدد آپ کی چسپاں کی ہوئی سطروں اور واپس ملنے والی سطروں کا فرق ہے، اس لیے خالی سطریں پھینکنا اسے اصل نقلوں کی تعداد سے بڑھا دیتا ہے۔
  • آخری موقع رکھنے سے جگہیں بدل جاتی ہیں: پہلی نقل غائب ہو جاتی ہے اور بچی ہوئی سطر وہیں رہتی ہے جہاں آخری تھی۔ اسے اس وقت چنیں جب فہرست میں اضافے ہوتے رہے ہوں اور تازہ ترین اندراج جیتنا چاہیے۔
  • ترتیب اختیاری ہے اور آخر میں لگتی ہے: اسے بند رہنے دیں تو بچی ہوئی سطریں اسی ترتیب میں رہیں گی جس میں آپ نے چسپاں کی تھیں، اور لاگ اور ہر زمانی چیز کے لیے یہی درکار ہوتا ہے۔

Whole lines, compared exactly

Two lines are duplicates only if every character matches. That sounds obvious and it is the source of nearly every disappointing result.

A trailing space makes two visually identical lines different. So does a capital letter, a curly quote where the other line has a straight one, or a non-breaking space pasted in from a website. The [msm_tool slug="remove-duplicate-lines"] will keep both, correctly, and it will look like it did nothing.

If a deduplication leaves entries you were certain were duplicates, clean the whitespace first and run it again. That fixes it most of the time.

The removed count includes blank lines

Empty lines are lines. If your text has ten blank lines scattered through it, nine of them are duplicates of the first and will be counted as removed.

That inflates the number and is not an error. If the count looks higher than the duplicates you expected, blank lines are usually the difference.

Order is preserved

The first occurrence of each line stays where it was, and later copies are removed. The list does not get sorted as a side effect.

That matters when order carries meaning — a sequence of steps, a chronological log, a priority list. If you want the result sorted, sort it separately afterwards.

Case

By default the comparison is exact, so Apple and apple are two different lines.

For a list of email addresses, tags or keywords that is usually wrong — they are the same entry typed inconsistently. For a list of identifiers or code, case may genuinely distinguish them. Decide which kind of list you have before deciding whether the result is correct.

Where this is genuinely useful

  • Merged mailing lists. Two exports concatenated, with overlap between them.
  • Keyword and tag lists assembled from several sources.
  • Log files, where the same line repeating a thousand times obscures the ones that matter.
  • URL lists for a redirect map or a crawl, where a duplicate entry means duplicate work.
  • Finding out whether there are duplicates at all — the count answers that even if you discard the result.

What it cannot do

It compares whole lines and nothing else. So:

  1. Near-duplicates survive. Two addresses differing by a postcode format, two names with a middle initial on one — both stay. Fuzzy matching is a different problem and a much harder one.
  2. Duplicates by one field do not. A CSV where two rows share an email address but differ elsewhere is two different lines. Deduplicating by a column needs a spreadsheet or a script.
  3. Multi-line records are not handled. If each entry spans several lines, comparing line by line will happily remove a shared line from the middle of two otherwise different records.

Keep the original

Removal is not reversible here, and the count alone will not tell you what went. Everything runs in your browser, so nothing is uploaded — and nothing can be recovered either.

اکثر پوچھے گئے سوالات

خاص طور پر دہری سطریں ہٹانے والا کے بارے میں۔ اس زمرے سے متعلق عمومی سوالات کے جواب زمرے کے صفحے پر موجود ہیں۔

نہیں۔ حروف کی یکسانی صرف یہ طے کرنے کے لیے استعمال ہوتی ہے کہ نقل کیا ہے۔ جو سطر بچتی ہے وہ بالکل ویسی چھپتی ہے جیسی آپ نے لکھی تھی۔
دونوں ایک نقل چھوڑتے ہیں۔ پہلا آپ کی اصل ترتیب برقرار رکھتا ہے؛ آخری بچی ہوئی سطر کو وہاں لے جاتا ہے جہاں آخری موقع آیا تھا۔
جو خالی سطریں پھینکی گئیں وہ بھی اس عدد میں شامل ہیں۔ انہیں ہٹانے کا اختیار بند کر دیں تو اعداد برابر ہو جائیں گے۔
نہیں۔ ترتیب برقرار رہتی ہے جب تک آپ حروفِ تہجی والی ترتیب نہ چنیں، جو نقل ہٹانے کے بعد لگتی ہے۔
براہِ راست نہیں — موازنہ سطر بہ سطر ہوتا ہے۔ پہلے ہر لفظ الگ سطر میں رکھ دیں، پھر وہی نقل ہٹانا لاگو ہو جائے گا۔

نئے ٹولز، خصوصیات اور کارکردگی بڑھانے کے مشوروں کی اطلاع پانے کے لیے سبسکرائب کریں۔