Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. 20070101 10.2317 79.1638 6.0 26.7 20.9 0.8 14.0 98.6
  2. 20070102 10.2317 79.1638 5.6 26.5 20.8 1.9 13.6 98.0
  3. 20070103 10.2317 79.1638 7.5 27.7 20.8 0.1 15.8 96.4
  4. 20070104 10.2317 79.1638 8.1 26.0 19.6 0.0 15.5 94.1
  5.  
  6. 01/01/2007 10.2317 79.1638 6.0 26.7 20.9 0.8 14.0 98.6
  7. 02/01/2007 10.2317 79.1638 5.6 26.5 20.8 1.9 13.6 98.0
  8. 03/01/2007 10.2317 79.1638 7.5 27.7 20.8 0.1 15.8 96.4
  9. 04/01/2007 10.2317 79.1638 8.1 26.0 19.6 0.0 15.5 94.1
  10.  
  11. $ awk '{print $1}' filedate.txt
  12. 20070101
  13. 20070102
  14. 20070103
  15. 20070104
  16.  
  17. for i in $(awk '{print $1}' filedate.txt); do date -d "$i" +%d/%m/%Y; done
  18. 01/01/2007
  19. 02/01/2007
  20. 03/01/2007
  21. 04/01/2007
  22.  
  23. for i in $(awk '{print $1}' filedate.txt); do dt=$(date -d "$i" +%d/%m/%Y) && awk '{$1=$dt}1' filedate.txt; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement