Homework
3 – Using the Shell
Given Wednesday, September 11, 2019.
Due via BLACKBOARD on Sunday,
September 29 at 1159pm.
The assignment will have you working with shell metacharacters
and other features. In order to answer the questions, you will need a directory
containing 16 files, with the following names. (Note, see question 1 before
creating the files.) To get
full credit, your answer should be the most efficient and least "brute
force".
abet
able
ably
abut
abacus
aboard
abroad
absorb
bail
bait
band
bang
bakery
banked
banker
bazaar
- Describe a method for
creating all of these files without creating each one manually
with a text editor OR having to type them all into the command line (Hint:
The
touch
command can
create a given file.)
- Use the ls command with a
single argument to list all files whose names end with the letter 'r'.
(Include the command and its output for full credit on this and all
following questions.)
- Use the ls command with a
single argument to list all files whose names contain the letter 's'.
- Use the ls command with a
single argument to list all files whose names start with 'ba' followed by a vowel.
- Use the ls command with a
single argument to list all files whose names start with 'ab' and contain
an 's' somewhere in the name.
- Use the ls command with a
single argument to list all files whose names contain two consecutive
vowels.
- Use the ls command with a
single argument to list all files whose names start with a 'b' and contain
two consecutive vowels.
- Use the ls command with a
single argument to list all files whose names contain only 4 letters.
- Use the ls command with a
single argument to list all files whose names contain either an 'l' or an 'n'
as the third letter.
- Use the ls command with a
single argument to list all files whose names end with a letter from the
second half of the alphabet (letters 'm' through 'z').