cat header sortedfile > newfile, the operation takes 2 minutes as the sorted file is over 400mb.
I have noticed that when I sort the 400mb unsorted file, this only takes 14 seconds to create the output.
Did that 14 second sort write everything to disk too by redirection or just output to your screen? Question might sound dumb, but just the be sure that it is written to disk too.
So, I have a file that has some duplicate lines. The file has a header line that I would like to keep at the top.
I could do this by extracting the header from the file, 'sort -u' the remaining lines, and recombine them. But they are quite big, so if there is a way to do it with a single... (1 Reply)
Hi Experts,
I want to Sort the data in fixed width file where i have Header and Footer also in file.
I m using below commad to do the sort based on field satarting from 15 position to 17 position , but it is not ignoring the Header and Footer of the file while sorting. In the output i am... (5 Replies)
I am having report file with header and footer . The details in between header and footer are separated by a pipe charater. I want to sort the file by considering multiple columns in between header and footer.
pls help (4 Replies)
How to sort a tab delimited file first on col1 and then on col2. Also I need to keep the header intact.
file.txt
val1 val2 val3 val4
a b c d
m n o p
e f g h
i j k l
... (3 Replies)
My files location
Dir=/pp/Output/Test/
I have 100 .txt files on above location.
I want add header "pt all" on each file.
Sample Text file
Hi
Kalol
Jt all
q
Output i want
lt all
Kalol
Jt all (2 Replies)
Hi,
I have an input like this
1 2 3 4
2 3 4 5
4 5 6 7
I would like to count the no. of columns and print a header with a prefix "Col".
I would also like to count the no. of rows and print as first column with each line number with a prefix "Row"
So, my output would be
... (2 Replies)
Hi,
I'm trying to sort 2 different .txt tab delimited files with the command line:
sort -k 1b,1 inputfile > outputfile
But doing that i'm also sorting the header (that ends at the end of my file).
How can i sort a .txt file without sorting the header but conserving the header in the... (3 Replies)
I have several las files with a header and each file start Version and text and before the data starts end up with ~Ascii, then the numbers starts:
-------------------------------------------------------------------------
Code:
~Version
.....text....
~Ascii
2 abc 230 1 name
1 abc ... (1 Reply)
I have several las files with a header and each file start Version and text and before the data starts end up with ~Ascii, then the numbers starts:
-------------------------------------------------------------------------
~Version
.....text....
~Ascii
2 abc 230 1 name
1 abc 400 1... (17 Replies)
Hi,
I am using SUN SOLARIS (SunOS sun4v sparc SUNW, T5240).
I have a huge data file with header and trailer. This file gets used into an ETL process. ETL skips the header record (which is the first record of the file) and loads the rest of the record. The file can be delimited (comma,... (5 Replies)
Discussion started by: Saanvi1
5 Replies
LEARN ABOUT DEBIAN
flow-rptfmt
flow-rptfmt(1) General Commands Manual flow-rptfmt(1)NAME
flow-rptfmt -- Format the output of flow-report in ASCII or HTML
SYNOPSIS
flow-rptfmt [-hHnp] [-a alarm_time] [-f format] [-F fields] [-m max_lines] [-s sort_field]
DESCRIPTION
The flow-rptfmt utility processes the CSV output of flow-report into formatted ASCII or HTML. Sorting, maximum display lines, field fil-
ter, header display, and name substitution are supported during post processing. Additionally an alarm can be set for use in CGI scripts
to limit the CPU time of formatting.
OPTIONS -a alarm_time
Exit after alarm_time seconds.
-f ascii|html
Set output format. Defaults to ASCII.
-F display_fields
Limit columns to display_fields
-h Help.
-H Display header information.
-m max_lines
Limit rows to max_lines.
-n Enable symbol table lookups.
-p Display in percent total form.
-s sort_field
Sort on sort_field. Prepend with + for ascending, - for descending sort.
EXAMPLES
Format the output of daily-ip-protocol.txt in ASCII. Display the ip-protocol and octets fields in percent total format with symbols.
Limit output to top 5 sorted by octets.
cat daily-ip-protocol.txt | flow-rptfmt -fascii -Fip-protocol,octets -p -n -m5
BUGS
Sorting could be faster. Percent totals could be faster. May not work with flow-report prior to 0.68.
AUTHOR
Mark Fullmer maf@splintered.net
SEE ALSO flow-tools(1)flow-rptfmt(1)