IT 244: Introduction to Linux/Unix
Answers to Class 21 Ungraded Quiz

  1. What does Bash do when it performs history expansion?
    it reruns an old command line which it retrieves from the history list
  2. What does Bash do when it performs alias substitution?
    it replaces the name of the alias with a Unix command
  3. Write the command you would use to create the files foo1.txt to foo5.txt using brace expansion and the touch command.
    touch  foo{1,2,3,4,5}.txt
  4. What does Bash do when it performs tilde (~) expansion?
    replaces ~ with the absolute address of your home directory or replaces~UNIX_USERNAME with the absolute address of the home directory of UNIX_USERNAME
  5. What does Bash do when it performs parameter and variable expansion?
    substitutes the value of a variable or a parameter for the name of the variable or parameter when preceded by a $
  6. What does Bash do when it performs arithmetic expansion?
    treats the digits inside double parentheses as numbers, performs arithmetic operations	on them and substitutes the result of that calculation for the expansion expression
  7. What is command substitution used for?
    allows the output of a command to be used on the command line
  8. What would you write at the command line to define the alias ll whose value was ls -l ?
    alias ll='ls -l'
  9. Can an alias be made global?
    no
  10. Can a function be made global?
    no