Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #1.)
  4. #a)
  5. ls -d -- /usr/share/gtk*/
  6. #b)
  7. ls -d -- /usr/share/*[0-9]*[0-9]*/
  8. ----------------------------------------------------------------------
  9. #2.)
  10. #a)
  11. grep -E ^.*[0-9]+.*$ /usr/share/dict/words
  12. #b)
  13. grep -E ^i.*[A-Z]+.*$ /usr/share/dict/words
  14. #c)
  15. grep -E '^[^aeiouAEIOU]*$' /usr/share/dict/words
  16. #d)
  17. grep -cE ^.*[aeiouAEIOU]+[aeiouAEIOU]+.*$ /usr/share/dict/words
  18. #e)
  19. grep -cE '^.*ening$' /usr/share/dict/words
  20. #f)
  21. grep -c "'s$" /usr/share/dict/words
  22. #g)
  23. grep -c "[A-Z]$" /usr/share/dict/words
  24.  
  25. ----------------------------------------------------------------------
  26.  
  27. #3.)
  28. #a)
  29. sed "s/'s$/s/" /usr/share/dict/words
  30. #b)
  31. sed "s/.*word.*/word/" /usr/share/dict/words
  32. #c)
  33. grep "^[A-Z]" /usr/share/dict/words | sed -e 's/^./\l&/;s/.$/\u&/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement