Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #I have tried the following commands:
  2. $cat numbers
  3. 1 2
  4. 10 20
  5. 100 200
  6. 1000 2000
  7. 10000 20000
  8. 100000 300000
  9. 1000000 3000000
  10.  
  11. cat numbers | cut -f 2 > copynumbers
  12.  
  13. #How do I get field 1 from the original file into field 2 of the output file?
  14. $cat copynumbers
  15. 2
  16. 20
  17. 200
  18. 2000
  19. 20000
  20. 300000
  21. 3000000
  22.  
  23. $ paste <(cut -f2 numbers) <(cut -f1 numbers)
  24. 2 1
  25. 20 10
  26. 200 100
  27. 2000 1000
  28. 20000 10000
  29. 300000 100000
  30. 3000000 1000000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement