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 19 in Linux Administration by akhtar
• 32,960 points
36 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 19 by MD
• 77,580 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 in Linux Administration by MD
• 77,580 points
146 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 in Linux Administration by MD
• 77,580 points
131 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 in Linux Administration by MD
• 77,580 points
83 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 in Linux Administration by MD
• 77,580 points
88 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,870 points
793 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 19 in Linux Administration by MD
• 77,580 points
47 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 19 in Linux Administration by MD
• 77,580 points
28 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 in Linux Administration by MD
• 77,580 points
77 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 in Linux Administration by MD
• 77,580 points
79 views