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.