Practice Quiz: Bash Scripting

6. Which of the following commands will output a list of all files in the current directory?

  • echo *.py
  • echo ?.py
  • echo a*
  • echo *

7. Which module can you load in a Python script to take advantage of star [*] like in BASH?

  • Glob
  • ps
  • Free
  • stdin

8. Conditional execution is based on the _____ of commands.

  • environment variables
  • parameters
  • exit status
  • test results

9. What command evaluates the conditions received on exit to verify that there is an exit status of 0 when the conditions are true, and 1 when they are false?

  • test
  • grep
  • echo
  • export

10. The opening square bracket ([), when combined with the closing square bracket (]), is an alias for which command?

  • glob
  • test
  • export
  • if

Devendra Kumar

Project Management Apprentice at Google

Leave a Reply