How about if I want to sort it by filename (ie the 2nd field)?
Main Topics
Browse All Topics
I have the following file which contain following lines :
432,343 104324.txt
32.432 3534.txt
323 3432243.txt
. . . . . .
where first column is a numbefr (could be hundred) or thousands
with , in between.
I would like to change the content of the file such that it became
323 3432243.txt
32432 3534.txt
432343 104324.txt
so that the commas are removed & it's sorted by size.
Also will need a script that removes the commas,
& sort by filename
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Amit has given the answer, only you need to put the provided command in a script file and set execution permission for it. example script file is attached which translate and sort the file given as 1st argument on command line and throw output to display, this can be redirected to create a new updated file.
Business Accounts
Answer for Membership
by: amit_gPosted on 2009-10-12 at 22:30:47ID: 25557144
sed 's/,//g' TheInputFileName | sort -k1,1 -n