Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. domain1 NS ns1
  2. domain1 NS ns2
  3. domain1 NS ns3
  4. domain2 NS dnsx
  5.  
  6. domain1,ns1,ns2,ns3
  7. domain2, dnsx
  8.  
  9. awk '
  10. $1 != domain {
  11. if (domain) print ""
  12. printf "%s", $1
  13. domain = $1
  14. }
  15. {printf ",%s" $3}
  16. END {print ""}
  17. ' file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement