title: how use awk for put at the begin the last value by record field?
body: <p>Im triying to get all record an put at begin the last value per record but I dont know how</p>
  
  <p>This is my input</p>
  
  <pre>
  grey;5
  grey;6
  grey;3
  blue:2
  blue;1
  blue;0
  red;5
  red;7
  red;2
  
  </pre>
  
  <p>this is my expected output</p>
  
  <pre>
  grey;3
  grey;5
  grey;6
  grey;3
  blue;0
  blue:2
  blue;1
  blue;0
  red;2
  red;5
  red;7
  red;2
  
  </pre>
  
  <p>I use this command but not works</p>
  
  <pre><code> awk -F\; '{a[$1]=$0} $0; END{for(i in a) print a[i]}' file
  </code></pre>
  
  <p>what could I do </p>
  
  <p>Please help me</p>