Guest User

Untitled

a guest
Jun 14th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. abcd_Server1 CCDDomain
  2. defg_Server1 GGFDomain
  3. kdkhs_Server1 CCDDomain
  4. abce_Server1 CCDDomain
  5. dgdg_Server1 CCADomain
  6. dfdkhs_Server1 GGFDomain
  7.  
  8. grep -oh '*Domain' "ServerNames.txt" | sort -u | wc -l
  9.  
  10. $ awk '$2 ~ /Domain/ && !a[$2]++{ cnt++ }END{ print cnt }' ServerNames.txt
  11. 3
  12.  
  13. $ uniq -f1 <(sort -k2 ServerNames.txt) | wc -l
  14. 3
  15.  
  16. grep -oh '[[:alpha:]]*Domain[[:alpha:]]*' ServerNames.txt | sort | uniq | wc -l
  17.  
  18. % grep -oh "wDomainw" ServerNames.txt
  19. CCDDomain
  20. GGFDomain
  21. CCDDomain
  22. CCDDomain
  23. CCADomain
  24. GGFDomain
  25.  
  26. % grep -oh 'wDomainw' ServerNames.txt | sort -u | wc -l
  27. 3
Add Comment
Please, Sign In to add comment