There is a vector of numbers I have which are in ascending order (it is called t8_)2 7 8 9 11 15 34 91 91 92 94The problem is that some numbers happen two times. I don't want to remove them, but they have to become two numbers which are distinct and not floating point. I thought first about iterating through the vector:which(duplicated(t8)) - that would be 9 and then go on t8[which(duplicated(t8))]<-t8[which(duplicated(t8))]+1The next vector would be2 7 8 9 11 15 34 91 92 92 94Repeating same process:which(duplicated(t8)) - that would be 10 and the go on t8[which(duplicated(t8))]<-t8[which(duplicated(t8))]+1when the vector would be 2 7 8 9 11 15 34 91 92 993 94I tried sort -u and sort -nu (they do not work).Is there  a perl or python way to do that interactively...till no duplicate numbers are present?I would like to do this with a file to put to the function...edit...The answer is not working with my vector file:https://www.dropbox.com/s/vp67eiw4ns9rr07/num?dl=0
get values which only occur once in a vector
regular expression;python;perl