Advertisement
Guest User

Untitled

a guest
Mar 7th, 2019
981
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. 1234,Joe,pieter,joe@gmail.com,male,22
  2. 1235,Shally,Jonse,shally@yahoo.com,female,24
  3. 1235,Harry,poter,harry@gmail.com,male,21
  4. 1235,Helen,Jairag,helen@gmail.com,female,21
  5. 2585,Dinesh,Jairag,helen@gmail.com,female,21
  6.  
  7. 1234,Joe,pieter,joe@gmail.com,male,22
  8. 1235,Shally,Jonse,shally@yahoo.com,female,24
  9. 1235,Harry,Potter,harry@gmail.com,male,21
  10. 1235,Helen,Jairag,helen@gmail.com,female,21
  11.  
  12. diff F2 F1
  13.  
  14. 3c3
  15. < 1235,Harry,Potter,harry@gmail.com,male,21
  16. ---
  17. > 1235,Harry,poter,harry@gmail.com,male,21
  18. 4a5
  19. > 2585,Dinesh,Jairag,helen@gmail.com,female,21
  20.  
  21. 1235,Harry,poter,harry@gmail.com,male,21
  22. 2585,Dinesh,Jairag,helen@gmail.com,female,21
  23.  
  24. diff --changed-group-format='%<' --unchanged-group-format='' file1 file2
  25.  
  26. diff -u File1 File2
  27.  
  28. --- File1 2012-08-22 11:30:07.000000000 +0200
  29. +++ File2 2012-08-22 11:30:25.000000000 +0200
  30. @@ -1,5 +1,4 @@
  31. 1234,Joe,pieter,joe@gmail.com,male,22
  32. 1235,Shally,Jonse,shally@yahoo.com,female,24
  33. -1235,Harry,poter,harry@gmail.com,male,21
  34. +1235,Harry,Potter,harry@gmail.com,male,21
  35. 1235,Helen,Jairag,helen@gmail.com,female,21
  36. -2585,Dinesh,Jairag,helen@gmail.com,female,21
  37.  
  38. diff -u data1 data2 |
  39. awk 'NR > 2 && $0 ~ /^+/ {print substr($0,2)}'
  40.  
  41. 1235,Harry,Potter,harry@gmail.com,male,21
  42.  
  43. diff -u data2 data1 |
  44. awk 'NR > 2 && $0 ~ /^+/ {print substr($0,2)}'
  45.  
  46. 1235,Harry,poter,harry@gmail.com,male,21
  47. 2585,Dinesh,Jairag,helen@gmail.com,female,21
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement