LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-16-2022, 01:10 AM   #1
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Rep: Reputation: 15
Full sort -u option command for a more specific/detail aim


How is the complete sort -u option command syntax in more specific purpose in order to remove all inexact duplicate lines that is instead of finding exact characters in line to remove, every line with existing space between words its length may vary so considered duplicate ?
 
Old 07-16-2022, 01:33 AM   #2
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,832

Rep: Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219
Please show an example input (in code tags so spaces are retained)!

In sort you can limit to certain keyfields. But awk and bash-builtins might be more aporopriate here.
 
1 members found this post helpful.
Old 07-16-2022, 02:34 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
I'm a simple soul - I would use sed to reduce all multiple white-space to single and pipe to sort.

KISS.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which option needs to be set to execute a command as a different user using the "su" command? (long version of the option) DarkBrainsDecoder Linux - Newbie 10 10-19-2022 01:24 PM
have done so far. The more detail you include the more we can help. You should also u Jorge Alvarado Linux - Newbie 4 05-31-2015 10:16 AM
FreeBSD7: More information, in better detail, of attached storage drives, than fdisk rautamiekka *BSD 1 07-05-2008 10:24 AM
kernel progarmmer's(module compiletion problem)==> full detail<== mishranavaneet Programming 1 01-07-2004 01:04 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration