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.
Loading...
Related Quiz
- In the context of networking, what does the acronym "NAT" stand for?
- Which directory is crucial for the system booting process?
- What is the purpose of the $? variable in a shell script?
- The _________ Linux distribution is enterprise-focused and is backed by Red Hat.
- You are working on a system and want to compile a program from source. You realize you need some development tools. In which directory would you expect to find these tools?