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

  1. What character would you use if you wanted to run two commands, one right after the other, on a single command line?
    ;
  2. What other two characters allow more than one command to be run on a single command line?
    & and | (the pipe character)
  3. How can you continue a command onto the next line?
    type \ immediately before hitting Enter
  4. What does the dirs command do?
    prints the current directory stack
  5. If you wanted to go to the root directory, but wanted to get back to where you were easily, what would you enter at the command line?
    pushd  /
  6. If you used the command above, what would you type at the command line to get back to the previous directory?
    popd
  7. What is special about a global variable?
    you can use it in any subshell of the shell in which it was created.
  8. What are the limitations of a local variable?
    you can only use it in the shell in which it was created
  9. What would you type at the command line to create the local variable foo and assign it the value "FOO"?
    foo=FOO
  10. What would you type at the command line to create the global variable bar and assign it the value "BAR"?
    export bar=BAR