Hi.
I've formatted a long txt file with 300 lines, where each line consists of comma separated values with 60 fields for each line.
How could i sort all the lines with the second(counting from zero)element in each line as the "sort argument"
Example:
" ", "310805", "30000", ".....", ......
" ", "310805", "30000", ".....", ......
" ", "310805", "30025", ".....", ......
" ", "310805", "30000", ".....", ......
" ", "310805", "30020", ".....", ......
" ", "310805", "30000", ".....", ......
" ", "310805", "30000", ".....", ......
" ", "310805", "30025", ".....", ......
I would like to write a function that sorts(and writes to a new file) in this order:
" ", "310805", "30000", ".....", ......
" ", "310805", "30000", ".....", ......
" ", "310805", "30000", ".....", ......
" ", "310805", "30000", ".....", ......
" ", "310805", "30000", ".....", ......
" ", "310805", "30020", ".....", ......
" ", "310805", "30025", ".....", ......
" ", "310805", "30025", ".....", ......
Help would be much appreciated.