The current directory contains the following file:
-rwxr-xr-x 1 root root 859688 Feb 7 08:15 test.sh
Given that the file is a valid shell script, how can this script be executed? (Choose two.)
The current directory contains the following file:
-rwxr-xr-x 1 root root 859688 Feb 7 08:15 test.sh
Given that the file is a valid shell script, how can this script be executed? (Choose two.)
The script can be executed directly if it has execute permissions, which is indicated by the 'rwxr-xr-x' part of the file details. Option D './test.sh' runs the script directly from the current directory. Option E 'bash test.sh' correctly executes the script using the bash shell, which is another valid way to run a shell script.
D & E is the correct answer
D. ./test.sh E. bash test.sh
The answer: D , E