Sort 3 or more columns in a HTML file | Unix Linux Forums | Web Programming

  Go Back    


Web Programming Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, HTML, SEO, and other Web APIs and topics.

Sort 3 or more columns in a HTML file

Web Programming


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-28-2013
jacobs.smith jacobs.smith is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 29 July 2014, 2:43 PM EDT
Posts: 297
Thanks: 252
Thanked 5 Times in 5 Posts
Sort 3 or more columns in a HTML file

Hi Friends,

I have a HTMl file with 10 columns.

I found a script online that can sort any single column in a HTML file.

But, I would like to sort on multiple columns at once.

Could you please show some pointers?

Thanks
Sponsored Links
    #2  
Old 01-28-2013
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 31 July 2014, 5:04 PM EDT
Location: Galactic Empire
Posts: 3,358
Thanks: 230
Thanked 1,192 Times in 1,124 Posts
How about using sort command with -k option.

For further reference check sort manual
Sponsored Links
    #3  
Old 01-28-2013
jgt's Avatar
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 28 July 2014, 5:41 PM EDT
Location: 44.21.48N 80.50.15W
Posts: 1,541
Thanks: 1
Thanked 155 Times in 148 Posts
Replace the field that is being sorted on (in the script you found) to be the concatenation of the the columns you want to sort on.
Are you trying to do this in javascript in the browser, or on the server end?
    #4  
Old 01-29-2013
jacobs.smith jacobs.smith is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 29 July 2014, 2:43 PM EDT
Posts: 297
Thanks: 252
Thanked 5 Times in 5 Posts
Quote:
Originally Posted by jgt View Post
Replace the field that is being sorted on (in the script you found) to be the concatenation of the the columns you want to sort on.
Are you trying to do this in javascript in the browser, or on the server end?

I am trying to do it in the browser, not on the server end but at the user end?
Sponsored Links
    #5  
Old 01-29-2013
jgt's Avatar
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 28 July 2014, 5:41 PM EDT
Location: 44.21.48N 80.50.15W
Posts: 1,541
Thanks: 1
Thanked 155 Times in 148 Posts
Do you have access to the javascript?
Sponsored Links
    #6  
Old 01-30-2013
jacobs.smith jacobs.smith is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 29 July 2014, 2:43 PM EDT
Posts: 297
Thanks: 252
Thanked 5 Times in 5 Posts
Quote:
Originally Posted by jgt View Post
Do you have access to the javascript?

Yes, I do.
Sponsored Links
    #7  
Old 01-30-2013
jgt's Avatar
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 28 July 2014, 5:41 PM EDT
Location: 44.21.48N 80.50.15W
Posts: 1,541
Thanks: 1
Thanked 155 Times in 148 Posts
Are you going to share it with us?

---------- Post updated at 06:09 PM ---------- Previous update was at 05:58 PM ----------

Are you going to share it with us?

Never mind, here is a pretty good primer: sorttable: Make all your tables sortable
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sort second columns in file. girish119d Shell Programming and Scripting 11 02-16-2012 01:23 PM
How to sort columns in excel(csv) file Man83Nagesh Shell Programming and Scripting 2 08-17-2010 07:16 AM
Sort file using 2 columns fargo UNIX for Dummies Questions & Answers 3 11-29-2009 03:01 AM
add columns from file to another and sort kamel.seg Shell Programming and Scripting 12 12-12-2007 01:39 PM
Help needed to sort multiple columns in one file ahjiefreak UNIX for Dummies Questions & Answers 1 12-07-2007 04:50 AM



All times are GMT -4. The time now is 05:39 PM.