Hi,

I have a file with 2 columns. First lists the space of the folder and the
second the folder name. Sample below:

2.1M    test1
220K    test2
2.2G    test3
2.2M    test4
22M     test5
22M     test6
2.2M    test7
230M    test8
232K    test9
I want to sort the file based on the space usage. Currently it is just
sorting based on the number. Is there a way to sort it the other way round.
Like making a stream editor first read each line upto a point it reaches a
non-numeric character then if the following character is K then divide by
1024, if it is G multiply by 1024 and so on and then sort the file. Is this
possible. I do not know to work well with stream editors and regexs'. Please
advise.

Regards,
Ashish
_______________________________________________
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to