how to add up a total in a summary report?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to add up a total in a summary report?
# 15  
Old 04-23-2009
what does sort -f4 do? what ae you trying to do here?

check man pages for sort.


cheers,
Devaraj Takhellambam
# 16  
Old 04-23-2009
trying to sort the field 4 which is date purchased
# 17  
Old 04-23-2009
Quote:
Originally Posted by xiaojesus
trying to sort the field 4 which is date purchased
but thats not the way you should sort..perhapes u r confused with f for field...

in POSIX form, use k to sort on the key/field

I am not sure how ur sort input looks like, but sort uses one or more spaces as the default field seperator.

so use
Code:
sort -k 4

or if u need to specify a field delimeter

use this

Code:
sort -t "filedsperator" -k 4


cheers,
Devaraj Takhellambam

Last edited by devtakh; 05-02-2009 at 02:47 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Generate a Summary report

Hi All, Script to meet my requirement might be simpler for UINIX experts.. :) I need to generate an summary report in .txt file using shell script I have Reject directory in Unix server which contains all reject files for three diff categories- Presentation, Chapter and Scene Following... (3 Replies)
Discussion started by: Sakthikalluri
3 Replies

2. Shell Programming and Scripting

Summary report csv file

Hello, I have 2 csv files with 4 columns each. file1.csv A, AA, AAA, AAAA B, BB, BBB, BBBB file2.csv C, CC, CCC, CCCC D, DD, DDD, DDDD I would like to use shell commands (sed, awk...) to copy the content of the 2 files (2x4 columns) into a final csv template file. Expected... (2 Replies)
Discussion started by: inMyZone35
2 Replies

3. Linux

How to calculate total CPU usage from SAR report?

Hi, I want to calculate the total cpu usage from the sar report. Say for example, Linux 2.6.24-21-generic (blade10) 09/10/2012 04:54:36 PM CPU %user %nice %system %iowait %steal %idle 04:54:37 PM all 0.00 0.00 0.00 0.00 ... (1 Reply)
Discussion started by: rohitmd
1 Replies

4. Shell Programming and Scripting

Parse diff output into very detailed & summary report

Hello all; I'll try an explain my dilemma as best I can. But first some background: 1- I am suppose to compare a database to itself before and after changes; basically generate audit trail report. 2- This database contains "RULES" (the id field) that we use for transmitting files. 3 - The... (0 Replies)
Discussion started by: gvolpini
0 Replies

5. UNIX for Dummies Questions & Answers

Print summary or the total disk usage of conf file

hey i want to print the summary or the total disk usage of the configuration files that are in the /etc directory printed in human-readable format. i think i got somewhere right as am using wc *.conf commands but i am unsure how to use to put it in human-readable format with the wc command. ... (13 Replies)
Discussion started by: stefanere2k9
13 Replies
Login or Register to Ask a Question