[info] Easy way to sort alphabetically a mess of words in a text file

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
797
Reaction score
656
Credits
5,099
I found a very useful command to sort alphabetically words in a text file in Linux with zero effort. The command works with all languages but for the purpose of the video I used words in English only. I made a short video as a demo and as you will see it takes just a few seconds. I made a bash script of the command for convenience but you can use it manually out of any scripts if you want. The command itself can be seen at the end of the video.The distro I'm using is Arch Linux, so I do not know whether it will work out-of-the-box in other distros or you'll have to install additional packages.
.
.
 


So, I'll wait for a few minutes for VSCode to start only to do something which can be done within 1-2 seconds after pressing Enter and WITHOUT the participation of any MS malware? No, thanks. You keep doing that, if you want. I'll stick to the true linux way.
 
So, I'll wait for a few minutes for VSCode to start only to do something which can be done within 1-2 seconds after pressing Enter and WITHOUT the participation of any MS malware? No, thanks.
There is no malware of any kind in VSCode, it's popular open source project reviewed by many, and the extension itself is 3rd party extensions also available on GitHub, thus also malware free.

In my case to fire up VSCode takes no more than 2 seconds (large project), and added benefit is that you can manage multiple files plus syntax highlighting and dark background among other cool things.

You keep doing that, if you want. I'll stick to the true linux way.
With all due respect, you're doing it the hard way, sorry.
And I highly suspect your script can handle all the features that the extension does.
 
I've been making do with the standard sort command and generally haven't found it lacking. Does sortabc improve upon sort?
 
The command itself can be seen at the end of the video
I only watched a few seconds as I dislike "reading" videos. I'd much rather read a web page that I don't have to pause and search back if things move too fast for me.

Regardless, thank you for the effort you put in to making the video.
 
I've been making do with the standard sort command and generally haven't found it lacking. Does sortabc improve upon sort?
From watching the video, sortabc is a one line script written by @rado84 that takes a file name as a parameter and uses sort to alphabetically sort the content of the passed-in file and write out a sorted file.

So for quickly sorting a file, it saves @rado84 from having to type a few extra words. It doesn’t improve on sort per se, but it makes it more convenient for him to use. I write little scripts, functions and aliases like this all of the time.
 
I've been making do with the standard sort command and generally haven't found it lacking. Does sortabc improve upon sort?
It's just the name of the alias, indicating that it sorts them alphabetically in ascending order. If I want them sorted in descending order, I'll type the alias "sortzyx". "sortabc" starts with "sort -i", whereas "sortzyx" starts with "sort -r".

There is no malware of any kind in VSCode
Says who? Microsoft? B***h, please! Malware is anything that Microsoft integrates into the code to spy on you - keyloggers, mostly. I suspect they get their "ideas" from codes they've stolen sent to them by the keylogger telemetry.
A few years ago the shameless Microsoft released the source code of the calculator. They didn't even bother to hide or remove the keylogging and the telemetry spying on the user!
If I were you, I'd run VSCode only in a VM.

 
Says who? Microsoft? B***h, please! Malware is anything that Microsoft integrates into the code to spy on you - keyloggers, mostly. I suspect they get their "ideas" from codes they've stolen sent to them by the keylogger telemetry.
I have telemetry disabled and so can anyone else, and my firewall (on which I spent a lot of time) would detect such activities as telemetry keylogging.

Therefore not only I rely on reviewers of the source code but also on my own firewall logs.

But I doubt you have any such observations to prove otherwise?

Let's just agree to disagree, I love VSCode and I can't imagine coding in sh**y code editor like vim.
 
A few years ago the shameless Microsoft released the source code of the calculator. They didn't even bother to hide or remove the keylogging and the telemetry spying on the user!
Btw. I just reviewed the code myself and have concluded that this was not a keylogger but telemetry connected to the OS, which according to MS privacy policy was completely legal and not hidden from the user.

If Windows users fail to disable telemetry in their Windows system that's their fault.

In any case I do not defend MS as that company is dead for me, all that I'm doing it defending VSCode which is excellent code editor.
 
I could show you more about their policy of user spying but we'll go in offtopic here. If you want, I can send you a screenshot via PM in the forum and you'll find out why I don't trust MS with anything.
And in that PM you can tell me what firewall software you're using for linux. I've never needed one, just curious what is out there on the matter.
 

Members online


Latest posts

Top