- publishing free software manuals

Articles > GNU Bash Quiz

Test your knowledge of GNU Bash with this quiz!

  1. The bash comment character is (a) %, (b) # or (c) ! ? (Easy)
  2. According to the bash quoting rules, what does echo "\'" print ? (Think carefully)
  3. Bash supports while loops, such as while ... done. Is the form of an until loop until ... done or do ... until?
  4. What is the difference between ( cd foo; ls; ) and { cd foo; ls; }?
  5. What is the meaning of ${FOO:+BAR}?
  6. What is the difference between $(ls) and `ls`
  7. What is the result of type help ?
  8. How can you test if a file is writable ?
  9. What command will put a job in the background so it keeps running after logging out ? (Hint: not bg)
  10. Name two ways to search through the interactive command history.

All answers can be found in "The GNU Bash Reference Manual (version 3.2)" (ISBN 0-9541617-7-7) by Chet Ramey and Brian Fox.