- Read http://www.uccs.edu/~ahitchco/grep/
- Log on to igor (or any other Unix system) and type:
grep -E "^a...d$" /usr/share/dict/words
Describe the output.
cat /usr/share/dict/words |wc -l
- How many words are there that start with a and end with k?
What are they?
- use grep to find the following:
- All the words that start with 'A' or 'a' and end with a 'c' and have at least one 'b' somewhere in between.
- All the words that start with 'A' or ('a' followed by zero or more 'b's and end with a 'c' and have at least one 'b' somewhere in between.
- Find all the words with all five vowels a,e,i,o,u occurring in order.
- Find all the words that do not have any vowels.
- Find all the filenames on the system that contain your username.
Use the 'locate' comand.
- Find all the words that end with 'and'.
- Find all the words that contain an 'a' and a 'b'.
- Find all the words that contain exactly one 'a' and exactly one 'b'.
- Write a Hope function which checks whether a list is a palindrome.
- Write a Hope function which takes a list of lists and returns the ones which are palindromes.