Which special variable in a shell script represents the script's name?

  • $0
  • $1
  • $script
  • $name
The special variable $0 in a shell script represents the script's name. It allows you to access the name of the currently executing script. This can be useful for self-referencing within the script or for providing a script name in error messages or logs.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *