![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help needed in sed | Alecs | Shell Programming and Scripting | 1 | 06-14-2008 02:46 PM |
| Help Needed in SED | raghav1982 | Shell Programming and Scripting | 4 | 04-07-2008 04:04 AM |
| SED Help Needed | Tide | UNIX for Dummies Questions & Answers | 2 | 01-28-2008 06:14 AM |
| Help Needed -sed | ravi.sadani19 | Shell Programming and Scripting | 9 | 10-06-2006 03:54 AM |
| Scp Help Needed !!!! | scooter17 | UNIX for Dummies Questions & Answers | 3 | 09-20-2006 01:50 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Awk help needed..
I have to add number in column 1 by month.
1531 Feb 1 2007 pgaps_p007_27909.trc 1529 Feb 1 2007 pgaps_p006_27907.trc 1533 Feb 1 2007 pgaps_p005_27905.trc 635 Apr 7 2007 pgaps_smon_2347.trc 634 Apr 7 2007 pgaps_lgwr_2343.trc 634 Apr 8 2007 pgaps_lgwr_2311.trc 613 Apr 10 2007 pgaps_p004_402.trc 615 Apr 10 2007 pgaps_p002_7500.trc 698 May 2 2007 pgaps_smon_2339.trc 634 May 5 2007 pgaps_lgwr_2335.trc 656 Mar 1 2007 pgaps_smon_8006.trc 634 Mar 3 2007 pgaps_lgwr_8002.trc 634 Mar 4 2007 pgaps_lgwr_2383.trc 641 Mar 8 2007 pgaps_qmn0_20351.trc Output should be : Feb 4593 Apr 3131 May 3897 When I run below awk command I am not getting desired output. ls -ltr |awk 'BEGIN { OFS = "\t"; ORS = "\n\n" } { print $1, $2, $3, $4 }'| awk '{tot=tot+$1}END{print tot}' Any help would be greatly appreciated. |
| Bookmarks |
| Tags |
| sum by column, sum by month |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|