Hi , I have a file file1.txt with data:
2010/09/04,21:53:42.048,a
2010/09/04,21:53:40.923,b
2010/09/04,21:53:40.923,a
2010/09/04,21:50:42.048,a.
I want to sort the file based on time stamp. I am currently using
sort -t% -k1.1,1.23 file1.txt > file2.txt
My expected output is
2010/09/04,21:50:42.048,a
2010/09/04,21:53:40.923,b
2010/09/04,21:53:40.923,a
2010/09/04,21:53:42.048,a
But, I am getting the following output
2010/09/04,21:50:42.048,a
2010/09/04,21:53:40.923,a
2010/09/04,21:53:40.923,b
2010/09/04,21:53:42.048,a
I am using SFU3.5 for windows. My sort usage is
usage: sort [-o output] [-cmubdfinr] [-t char] [-T char] [-k keydef] ... [files]
Please provide possible soultion.