📚 Practice Mode

Unix/Linux Operating System Commands

Learn at your own pace with hints and detailed explanations

1 / 14
Multiple Choice

I have a script named test.sh and the contents are as follows: $ cat test.sh echo hi rm -f test.sh echo hi ######## What will be the output of the following comand: $ sh test.sh

  1. the first 'hi' will be displayed but it will say "Could not delete file: in use" and will exit the script
  2. the first 'hi' will be displayed but it will say "Could not delete file: in use" and will then echo the second 'hi'
  3. The script will display 2 'hi' and the file will also be deleted
  4. The first 'hi' will be displayed, the script will be deleted , but the 2nd 'hi' will not be displayed.