![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Counting number of columns in a delimited file | net | Shell Programming and Scripting | 4 | 03-05-2009 04:56 AM |
| Adding EMPTY columns to Tab-delimited txt file | Banni | UNIX for Dummies Questions & Answers | 8 | 02-28-2009 02:30 PM |
| Reading columns in tab delimited file | net | Shell Programming and Scripting | 2 | 02-18-2009 08:01 AM |
| convert rows into columns | loperam | Shell Programming and Scripting | 2 | 12-01-2008 03:57 AM |
| Columns to rows | mgirinath | Shell Programming and Scripting | 16 | 11-29-2007 07:03 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
So I converted columns to rows but I want it to be tab delimited and also I want.....
Hi,
So my file looks like this: title number JR 2 JR 2 JR 4 JR 5 NM 5 NM 8 NM 2 NM 8 I used this line that I wrote to convert it to rows so it will look like this: awk -F"\t" '!/^$/{a[$1]=a[$1]" "$3} END {for ( i in a) {print i,a[i]}}' occ_output.tab > test.txt JR 2 2 4 5 NM 5 8 2 8 The problem is that the spacing is not tab delimited. I am missing something really obvious... The next thing I want to do is bin the rows... lets say I wanted to bin every second value and average them. so it will look like this: JR 2 4.5 NM 6.5 5 Anyone know a quick liner on how to do that? thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|