Hi All

Hi All,

 

I have 2 silly questions. 

I am going to have a file which is delimited by bang symbol (|).

1st and 2nd fields are numeric.

I need to sort by 2nd, 1st field.

I beleive my sort command will look like:

 

sort -t | -k 2,2n -k 1,1n file_name

 

Above command seems to work. However, if I omit  second sort qualifier and run:

 

sort -t | -k 2,2n file_name 

 

It still produces the right result.

Why?

 

... and second question:

According to man pages '-k b[n],[e][n] m defines beginning sort field and e - 
ending sort field.

 

Should be correct coding for 2nd and 1st field be -k 2,3 -k 1,2 ?
                                          
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to