Sponsored Content
Full Discussion: Grep 5 biggest column
Top Forums Shell Programming and Scripting Grep 5 biggest column Post 302789107 by radius on Wednesday 3rd of April 2013 05:39:31 AM
Old 04-03-2013
Grep 5 biggest column

please help,

file1.txt

Code:
id,week,ict,outgoing_call,blackberry_problem,gprs_problem,sms_problem,flash_problem,sinyal_lemah,blankspot,incoming_call,mms_problem,kualitas_suara,drop_call,data_probl
em,cross_connect,connect_no_voice,vas_problem
,1,sumbagsel,96,127,52,70,28,29,21,18,18,8,5,3,0,0,3
,2,sumbagsel,109,156,80,74,47,47,32,15,24,8,15,4,0,0,4
,3,sumbagsel,123,174,56,65,45,62,28,13,17,7,607,3,1,1,3
,4,sumbagsel,199,190,65,90,40,81,37,21,19,9,15,5,0,1,5
,5,sumbagsel,109,153,58,75,40,42,25,33,22,8,17,4,1,0,4
,6,sumbagsel,97,137,68,56,47,34,27,23,13,8,10,2,1,1,2
,7,sumbagsel,90,105,49,97,54,39,22,17,18,9,7,3,0,1,3
,8,sumbagsel,60,79,43,57,39,35,14,12,11,4,2,2,1,0,2
,9,sumbagsel,58,110,30,44,32,34,13,8,10,3,2,1,1,0,1
,10,sumbagsel,69,61,60,51,8,43,11,12,24,7,5,0,3,2,0
,11,sumbagsel,86,71,50,45,30,22,8,4,11,9,8,3,2,0,3
,12,sumbagsel,75,67,28,50,25,45,10,9,14,5,5,1,1,0,1
,13,sumbagsel,41,50,18,28,24,21,6,7,11,1,5,4,1,0,4

---------- Post updated at 04:34 AM ---------- Previous update was at 04:28 AM ----------

---------- Post updated at 04:39 AM ---------- Previous update was at 04:34 AM ----------

need to sort column based on the latest week (in this week is week=13)

expected output
file2.txt

Code:
       
id,week,ict,blackberry_problem,outgoing_call,sms_problem,flash_problem,sinyal_lemah  
,1,sumbagsel,127,96,70,28,29      
,2,sumbagsel,156,109,74,47,47      
,3,sumbagsel,174,123,65,45,62      
,4,sumbagsel,190,199,90,40,81      
,5,sumbagsel,153,109,75,40,42      
 ,6,sumbagsel,137,97,56,47,34      
,7,sumbagsel,105,90,97,54,39      
,8,sumbagsel,79,60,57,39,35      
,9,sumbagsel,110,58,44,32,34      
,10,sumbagsel,61,69,51,8,43      
,11,sumbagsel,71,86,45,30,22      
,12,sumbagsel,67,75,50,25,45      
,13,sumbagsel,50,41,28,24,21

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

The biggest newb ever...

Hi, all you unix people. I am a pretty advanced windows user, but I am curious about unix. Is there any reason I should attempt to acquire some form of unix for my home computer system? What sort of things is unix useful for? Unix is open source, right? Assuming that to be the case, I infer that... (3 Replies)
Discussion started by: BoneMalone
3 Replies

2. Solaris

top biggest files

hi all, is there any way how i can output the top 10-30 biggest files for all filesystem? using du -sh * is quite tedious since i have to move from 1 directory at a time. thanks (3 Replies)
Discussion started by: 3rr0r_3rr0r
3 Replies

3. Shell Programming and Scripting

finding biggest number

I think my script is working but i am trying to understand while I am tracing to see if it's realli working.. can somebody please comment.. also. is there different way to write this in shell? sh -x findbiggestnum 1 2 3 + big=0 + big=1 + big=2 + big=3 + echo 3 3 big=0 ... (3 Replies)
Discussion started by: hankooknara
3 Replies

4. Shell Programming and Scripting

Top 5 biggest file

Hi , I need to get a list of name and size , of the the top 5 biggest file under the current directory , in decending order Thank You (4 Replies)
Discussion started by: yoavbe
4 Replies

5. HP-UX

Biggest files on FS /

Hi! I'm using Unix HP I'm looking for a command which find the 20 (less or more) biggest files on / but which exclude every other files system Thanks;) (7 Replies)
Discussion started by: Castelior
7 Replies

6. Shell Programming and Scripting

help to get the biggest partition with awk

# fdisk -l /dev/sda Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk... (9 Replies)
Discussion started by: yanglei_fage
9 Replies

7. Shell Programming and Scripting

How to find biggest word in a file....?

With any cmd like sed grep ask etc... (1 Reply)
Discussion started by: sidpatil
1 Replies

8. Shell Programming and Scripting

How to awk or grep the last column in file when date on column contains spaces?

Hi have a large spreadsheet which has 4 columns APM00111803814 server_2 96085 Corp IT Desktop and Apps APM00111803814 server_2 96085 Corp IT Desktop and Apps APM00111803814 server_2 96034 Storage Mgmt Team APM00111803814 server_2 96152 GWP... (6 Replies)
Discussion started by: kieranfoley
6 Replies

9. UNIX for Beginners Questions & Answers

Grep A Column Based On Column Name

I have a file with two columns separated by white space. Dog Cat fido sneaky dopey poptart ears whisker barky herd Trying to list the words under the column named Dog. Tried a few variations of awk but can't... (4 Replies)
Discussion started by: jimmyf
4 Replies

10. Shell Programming and Scripting

Grep values from column 2 in reference of column 1

Gents Is it possible to update the code to get the desired output files from the input list. I called variable to the first column. I need to consider the first column as key to grep the values in the second column according to the desired request. input list (attached ) output1 ... (12 Replies)
Discussion started by: jiam912
12 Replies
PAPS(1) 						      General Commands Manual							   PAPS(1)

NAME
paps - UTF-8 to PostScript converter using Pango SYNOPSIS
paps [options] files... DESCRIPTION
paps reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves through the pango ft2 backend. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --landscape Landscape output. Default is portrait. --columns=cl Number of columns output. Default is 1. --font=desc Set the font description. Default is Monospace 12. --rtl Do rtl layout. --paper ps Choose paper size. Known paper sizes are legal, letter, a4. Default is A4. --bottom-margin=bm Set bottom margin in postscript points (1/72 inch). Default is 36. --top-margin=tm Set top margin. Default is 36. --left-margin=lm Set left margin. Default is 36. --right-margin=rm Set right margin. Default is 36. --help Show summary of options. --header Draw page header for each page. --markup Interpret the text as pango markup. --encoding=ENCODING Assume the documentation encoding is ENCODING. --lpi Set the lines per inch. This determines the line spacing. --cpi Set the characters per inch. This is an alternative method of specifying the font size. --stretch-chars Indicates that characters should be stretched in the y-direction to fill up their vertical space. This is similar to the texttops behaviour. AUTHOR
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>. This manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others). April 17, 2006 PAPS(1)
All times are GMT -4. The time now is 10:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy