You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have some files where I would like to re-number a column as follows: in the input column 5 is numbered from 1-4 and is sorted descending and has duplicate values. I want to reverse the order of the values, have them start from 1, and in cases of ties give them the same value - as in this example:
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
awk '{ $5 = (5 - $5) } ' file
--
Wayne
john.la...@gmail.com
unread,
Apr 24, 2017, 1:12:36 AM4/24/17
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
On Friday, April 21, 2017 at 10:10:33 PM UTC+2, Ed Morton wrote:
> Or maybe you meant duplicates in the existing 5th column:
>
> $ awk '$5!=p{c++} {p=$5; $5=c} 1' file
Perfect - works like dream! Apologies for not being clear.