Script basics · Question 10 of 12

tool.sh is executable and starts with #!/bin/bash. The current directory is not in PATH. Which calls start the script?

3 answers are correct. Medium Created with AI

Show answer

Answer

  • A ./tool.sh
  • C bash tool.sh
  • D "$PWD/tool.sh"

Explanation

Without a path, the shell only searches the directories in PATH. ./tool.sh and $PWD/tool.sh give the path, and bash tool.sh reads the file directly.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications