Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #1.)
- #a)
- ls -d -- /usr/share/gtk*/
- #b)
- ls -d -- /usr/share/*[0-9]*[0-9]*/
- ----------------------------------------------------------------------
- #2.)
- #a)
- grep -E ^.*[0-9]+.*$ /usr/share/dict/words
- #b)
- grep -E ^i.*[A-Z]+.*$ /usr/share/dict/words
- #c)
- grep -E '^[^aeiouAEIOU]*$' /usr/share/dict/words
- #d)
- grep -cE ^.*[aeiouAEIOU]+[aeiouAEIOU]+.*$ /usr/share/dict/words
- #e)
- grep -cE '^.*ening$' /usr/share/dict/words
- #f)
- grep -c "'s$" /usr/share/dict/words
- #g)
- grep -c "[A-Z]$" /usr/share/dict/words
- ----------------------------------------------------------------------
- #3.)
- #a)
- sed "s/'s$/s/" /usr/share/dict/words
- #b)
- sed "s/.*word.*/word/" /usr/share/dict/words
- #c)
- grep "^[A-Z]" /usr/share/dict/words | sed -e 's/^./\l&/;s/.$/\u&/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement