Homework #3
Due Tuesday, October 18, 6:00 PM
Problem 1
Show how to use egrep-style regular expressions to
search for
- lines that contain nothing but digits,
- lines that contain any of the words 'apple',
'butter', or 'scotch',
- lines that contain nothing other than the words
'apple', 'butter', or 'scotch' separated
by blanks,
- lines in which the number of times the character 't'
occurs is divisible by 3.
Problem 2.
For each of the four subproblems of Problem 1, write five lines
that thoroughly test your regular expression.
Problem 3.
Show how to use the find command to
- generate a list of files with names that end in '.C'
or '.c++',
- find all directories that are writable by members of the group
users,
- run compress on all files greater than 1Mbyte in size
that have not been accessed in 30 days.
Problem 4
How do you submit a batch job that will run at 8:00 PM?
Problem 5
How do you find out how much space is being used by the
directory ~/bin and all its subdirectories?
Problem 6
Mail your answers to Problems 1 to 5 to Dean Brock.