Sort / ascending order

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Sort / ascending order
# 1  
Old 03-04-2001

What's the command to sort a file in ascending order and redirect the output to another file?
# 2  
Old 03-05-2001
To sort file1 into file2, use
sort file1 > file2

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

List numerically in ascending order

Hello, I am running ubuntu 16.04 and trying to list all files inside a directory, I need to sort them in ascending order. While surfing on the site, I found an old thread but somehow it did not work. Link Ascending order with sort -nk2 myfile.txt command gives below output: file... (5 Replies)
Discussion started by: baris35
5 Replies

2. Shell Programming and Scripting

Sort date time in ascending order

Hi, i had a data block (coming from pipe from other codes) as: H YF_CO.dat 77164 11/17/2013 04:00:02 731374590.96 1 1 731374590.96 76586 77164 578 2988 Y H YF_CO.dat 77164 11/17/2013 04:00:07 731374590.96 1 4 731374590.96 76586 77164 578 2988 Y H YF_CO.dat 77178 ... (5 Replies)
Discussion started by: pr5439
5 Replies

3. UNIX for Dummies Questions & Answers

Strings in ascending order

Hi, I have a sequence which has 30000 strings which looks like this >string2991 234445 >string224 470561 >string121 675386 >string4098 177229 >string8049 255838 >string8 672382 >string1115 578415 I want it to be arranged in ascending order >string8 672382 >string121... (5 Replies)
Discussion started by: siya@
5 Replies

4. Shell Programming and Scripting

File listing in Ascending order

I have a multiple file with the following name like. file_0.csv file_1.csv file_2.csv file_3.csv file_4.csv file_5.csv file_6.csv file_7.csv file_7.csv file_8.csv file_9.csv file_10.csv file_11.csv file_12.csv file_13.csv file_14.csv (2 Replies)
Discussion started by: rakesh_arxmind
2 Replies

5. UNIX for Dummies Questions & Answers

sorting sequences in ascending order

Hi, I have this single file with a number of sequence inside it of format >string1 data >string100 data >string10 ..... >string5 ... >string67 ...... the dots represent data. I wanted to get the sequences arranged in ascending order like >string1 data >string5 (5 Replies)
Discussion started by: sonia102
5 Replies

6. UNIX for Dummies Questions & Answers

How to sort a column based on numerical ascending order if it includes e-10?

I have a column of numbers in the following format: 1.722e-05 2.018e-05 2.548e-05 2.747e-05 7.897e-05 4.016e-05 4.613e-05 4.613e-05 5.151e-05 5.151e-05 5.151e-05 6.1e-05 6.254e-05 7.04e-05 7.12e-05 7.12e-05 (6 Replies)
Discussion started by: evelibertine
6 Replies

7. Shell Programming and Scripting

Ascending order

How can I check if array is in ascending order? ---------- Post updated at 01:53 PM ---------- Previous update was at 01:25 PM ---------- Done it now (0 Replies)
Discussion started by: kristinu
0 Replies

8. Linux

Using sort command to get numeric ascending order

HI everyone, I am trying to use the unix sort command to get a list of numbers sorted in ascending order but having trouble in getting it to work. An example of this issue would be when i am trying to sort the following three number each on a different line "1" , "2" and "116" the sort command... (3 Replies)
Discussion started by: wali4813
3 Replies

9. UNIX for Advanced & Expert Users

merge two files in ascending order

Hello Friends, I want to merge two files in ascending order on the first field. And if the first field matches sort on 3rd field i.e, TXADDR should come ahead of RXADDR . file1 9 : TXADDR : 00000000 65 : TXDATA 0000000000000011 83 : TXDATA 0000000000000012 453 :... (10 Replies)
Discussion started by: user_prady
10 Replies

10. Shell Programming and Scripting

Ascending order within text

I appreciate all the help that I've already received but am running into one problem. I can find how to add something before a file with ascending numbers but not like this. I basically have a file that looks like this: 100 101 102 103 104 I need to add the following before each line with... (5 Replies)
Discussion started by: kerpm
5 Replies
Login or Register to Ask a Question