How to sort text alphabetically in Linux system

0 votes
Hi Guys,
I have one CSV file. I want to sort the data alphabetically. How can I do that in the Linux system?
Oct 20, 2020 in Linux Administration by akhtar
• 38,230 points
23,370 views

1 answer to this question.

0 votes

Hi@akhtar,

In the Linux system, you will find one command named sort. This command can sort your data alphabetically. 

$ cat words.txt | sort -k 2 

Here flag -k is used to select a field for sorting.

answered Oct 20, 2020 by MD
• 95,440 points

Related Questions In Linux Administration

0 votes
1 answer

How to check permissions of a file in the Linux system?

Hi@akhtar, If you prefer using the command line, ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,440 points
1,459 views
0 votes
1 answer

How to check permissions of a folder in the Linux system?

Hi@akhtar, You can use ls command to check ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,440 points
8,894 views
0 votes
1 answer

How to give the read power of a folder in Linux system?

Hi@akhtar, You can use chmod command in your ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,440 points
652 views
0 votes
1 answer

How to remove write permission from a folder in Linux system?

Hi@akhtar, You can use chmod command to remove ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,440 points
2,961 views
0 votes
1 answer
0 votes
1 answer

setting a variable output from a bash command

You can use $(command), which in my ...READ MORE

answered Feb 15, 2019 in Linux Administration by DareDev
• 6,890 points
2,164 views
0 votes
1 answer

Select sections of text from each line of files in a Bash shell.

Hi@akhtar, There is no inbuild command available for ...READ MORE

answered Oct 20, 2020 in Linux Administration by MD
• 95,440 points
699 views
0 votes
1 answer

How to find the first field from a file in Bash Shell?

Hi@akhtar, You can extract text from a file. ...READ MORE

answered Oct 20, 2020 in Linux Administration by MD
• 95,440 points
820 views
0 votes
1 answer

How to configure FTP server in Linux System?

Hi@akhtar, You need to install vsftpd software in ...READ MORE

answered Jul 9, 2020 in Linux Administration by MD
• 95,440 points
612 views
0 votes
1 answer

How to install MySQL in Linux system?

Hi@akhtar, You need to install the software for ...READ MORE

answered Jul 26, 2020 in Linux Administration by MD
• 95,440 points
649 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP