Sponsored Content
Top Forums Web Development Sort 3 or more columns in a HTML file Post 302762575 by Yoda on Monday 28th of January 2013 05:04:37 PM
Old 01-28-2013
How about using sort command with -k option.

For further reference check sort manual
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help needed to sort multiple columns in one file

Hi, I would like to know given that I have 3 columns. Let say I have first 3 columns to do operation and these operation output is printed out each line by line using AWK and associative array.Currently in the output file, I do a sort by -r for the operation output. The problem comes to... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

2. Shell Programming and Scripting

add columns from file to another and sort

hi, i have probleme to extract the columns info from file to another one; FILE A look like : x,inof1 y,inof1 z,info2 t,inof3 and FILE B like x t w d z i want to add correpondant columns (info) to each line of FILE B and sort this file by this columns. (12 Replies)
Discussion started by: kamel.seg
12 Replies

3. UNIX for Dummies Questions & Answers

Sort file using 2 columns

Hi, I am trying to sort a file first by the string column, then by the number column. file: xyz1 2 xyzX 4 xyz2 1 xyz13 3 xyz11 5 xyz13 10 xyz1 1 xyz10 1 xyz4 2 result should be xyz1 1 xyz1 2 ... (3 Replies)
Discussion started by: fargo
3 Replies

4. Shell Programming and Scripting

How to sort columns in excel(csv) file

i want sort columns with headers based on another file headers file1 eg: i'm having an empty file with only coumn names like lastname firstname title expirydate stlcno status etc... another file with same column names and some other as well but in different order... file2 eg:firstname... (2 Replies)
Discussion started by: Man83Nagesh
2 Replies

5. Shell Programming and Scripting

sort second columns in file.

File will have two columns key column and second column which is pipe separated and that need to be sorted. Below is input file. 1, D|B|A|C 2, C|A|B 3, E|A|F|G|H|D|B|C 4, A|B|D|C|F Output should be 1, A|B|C|D 2, A|B|C 3, A|B|C|D|E|F|G|H 4, A|B|D|C|F (11 Replies)
Discussion started by: girish119d
11 Replies

6. Shell Programming and Scripting

Sort HTML dropdown

I have a string str="<option>win2</option><option>hp</option><option>lin</option>" I have to arrange these in sorted order i.e <option>hp</option><option>lin</option><option>win</option> Can it be done by sort...? Thanks for help (0 Replies)
Discussion started by: Anu_1
0 Replies

7. Shell Programming and Scripting

How to sort a text file if certain columns are blank?

Dear all, I am trying to sort a text file based on column 3, 10, 11 and 12. But certain column are blank for some lines. Column 3 has to be in ascending order after sorting. Part of my input file is as follows: CN727990 1 A01 4703 5083 73.28 - A_scaffold000011 4365605 4365985 73.28 +... (10 Replies)
Discussion started by: huiyee1
10 Replies

8. Shell Programming and Scripting

Seperated by columns, merge in a file, sort them on common column

Hi All, I have 4 files in below format. I took them as an example. File 1: Cut from position 1-4 then 6-7 then 8-14 then rest left and make them as columns in one new file. Inserting character H to the initial of all line like HCTOT. CTOT 456787897 Low fever CTOR 556712345 High fever... (2 Replies)
Discussion started by: Mannu2525
2 Replies

9. Shell Programming and Scripting

Sort html based on .jar, .war file names and still keep text within three groups.

Output from zipdiff GNU EAR comparison tool produces output in html divided into three sections "Added, Removed, Changed". I want the output to be sorted by jar or war file. <html> <body> <table> <tr> <td class="diffs" colspan="2">Added </td> </tr> <tr><td> <ul>... (5 Replies)
Discussion started by: kchinnam
5 Replies

10. Shell Programming and Scripting

Sorting a html file with an external sort order

I am working on a web-concordance of Old Avestan and my concordance has produced a HTML file The sort deployed by the HTML file is not something which we normally use. I have tried my best to force a sort within the concordance itself, but the sort order does not work. I am giving below the sort... (6 Replies)
Discussion started by: gimley
6 Replies
ftpls(1)						      General Commands Manual							  ftpls(1)

       ftpls - generate a ftp directory listing

SYNOPSIS
ftpls ftp://host[:port]/directory or ftpls host[:post] /directory DESCRIPTION
ftpls generates a listing of files and directories in a FTP directory. ftpls by default prints a human readable ascii output, but may also create HTML and machine parsable output. OPTIONS
Login options -u, --user=NAME Use NAME to login on the ftp server. Note that this option overrides an user name given in an URL. The default is `anonymous'. Use an empty name to force to not log in. -p, --pass=PASSWORD Use PASS as password to login on the ftp server. Note that this option overrides a password given in an URL. The default is `anonymous@invalid.example'. Use an empty password to enforce not sending any password. --account=ACCOUNT Send ACCOUNT as the account name using the ACCT ftp command if the ftp servers asks for one. ACCOUNT in ftp speak is some kind of sub account in some other terminologies. If you don't understand what it means you have a good chance to never need this option anyway. If you think you need it please try the -u option first. --tries=NUMBER Number of tries to connect and log in. The default is 1, meaning that ftpls will give up after the first error. --login-sleep=NUMBER ftpls will sleep for NUMBER seconds after a try to connect or login has failed. The default is 5, a zero is treated as one, and abuse (especially together with --tries) is likely to annoy the server administrator. This option was added in version 0.4.5. Output mode options -h, --html Create HTML index containing all files together with modification time and size. Note: The links in this index will contain username and password if you include them into an URL given to ftpls on the command line (either as argument or through the --urlprefix option). They will not be included otherwise, for security and privacy reasons. -m, --machine Create machine parsable output. -t, --title=TEXT Title text to use on the HTML output. -U, --urlprefix=URL URL-Prefix to use in listings. If this option is not given then an URL given on the command line will be used instead, and if this has not been given an URL will be created from host, port and directory given on the command line. --print-dir Print the name of a sub directory before printing it's content. Do not print the name of the top level directory of the listing. Use this option together with --raw. Do not use it together with --html. SORTING -a, --alpha sort alphabetical. -z, --omega sort reverse alphabetical. -n, --newest sort youngest first. -o, --oldest sort oldest first. -s, --shortest sort shortest first. -l, --longest sort longest first. Other options --ascii-listings Do directory listings in ASCII mode instead of binary mode. Use this option if the FTP server is unable to correctly list directories in binary mode, for example, if you see a message like this: ftpls: failed to read directory listing: protocol error This option was added in version 0.5.2. -L, --list-options=OPTS Add OPTS to LIST command. This allows to pass arbitrary options to the FTP servers LIST command. Note that ftpls does not cope well with recursive directory listings. --interactive ftpls will read the directories to be listed from the standard input. Any remote directory given on the command line will be ignored. Each directory listing is terminated by a END-OF-LISTING line. Do not use this together with the --html option. This option was added in version 0.3.6. -R, --recursive Do a recursive directory listing by first printing one directory, including sub directory names, and then traversing into sub directories. --raw Output directory listings in the original format and sort order. -T, --timeout=SECONDS Timeout to use for network read/write and connect operations. The default is 30 seconds and is usually sufficient. This option was added in version 0.3.8. --force-select Do not use the poll() system call even if it's available, but use select(). This allows ftpls to be used together with the runsocks program from the socks5 reference implementation. Please note that you'll need a directly reachable name server anyway, as the DNS library in use does not support SOCKS (you can always use IP addresses). This option was added in version 0.3.8. --max-depth Descend at most LEVEL directories deep. 0 means do not enter sub directories at all, 1 means enter sub-directories, but not their sub-directories, and so on. This option enables the --recursive option, too. The default is 2^32-1, meaning enter all. This option was added in version 0.5.2. EXAMPLES
Generate a HTML index page ftpls --html --title "CVS tree index by date" --urlprefix ftp://ftp.ohse.de/uwe/cvs-trees/ --newest ftp://serak.ohse.de/uwe/cvs-trees > SOMEWHERE/cvs-trees/index-by-date.html AUTHOR
Uwe Ohse, uwe@ohse.de SEE ALSO
ftpcopy(1). The homepage may be more up-to-date, see http://www.ohse.de/uwe/ftpcopy.html. ftpcopy 0.5.2 ftpls(1)
All times are GMT -4. The time now is 02:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy