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

  1. 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.)
  2. 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.)
  3. Use the ls command with a single argument to list all files whose names contain the letter 's'.
  4. Use the ls command with a single argument to list all files whose names start with 'ba' followed by a vowel.
  5. 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.
  6. Use the ls command with a single argument to list all files whose names contain two consecutive vowels.
  7. Use the ls command with a single argument to list all files whose names start with a 'b' and contain two consecutive vowels.
  8. Use the ls command with a single argument to list all files whose names contain only 4 letters.
  9. 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.
  10. 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').