Hướng dẫn thử thách
1 / 174
$0 in Shell Scripting
### Giai đoạn: Nền Tảng & Khái Niệm Cốt Lõi
**$0 in Shell Scripting**
In shell scripting, `$0` is a special variable that holds the name of the script being executed. It essentially represents the command used to invoke the script. This can be the script's filename, or if the script was invoked with a path, it will contain that path. `$0` is useful for identifying the script itself within the script's code, for example, in logging or error messages.
### Khái niệm cốt lõi:
1. **In shell scripting, `$0` is a special variable that holds the name of the script being executed**
2. **It essentially represents the command used to invoke the script**
3. **This can be the script's filename, or if the script was invoked with a path, it will contain that path**
### Tài liệu tham khảo chính thống:
- [Understanding Special Parameters in Linux Shell Scripting](https://medium.com/@tradingcontentdrive/understanding-special-parameters-in-linux-shell-scripting-0-62768f49fb34) (article)
- [Using BASH Script Arguments](https://www.youtube.com/watch?v=vsRBWCfMf9A) (video)
Nhiệm vụ của bạn
Viết giải pháp của bạn cho bài học **$0 in Shell Scripting** vào trình soạn thảo bên cạnh. Bấm **Chạy Thử Nghiệm** (hoặc nhấn `Ctrl+Enter`) để thực thi và ghi nhận hoàn thành kỹ năng trên Roadmap.
### Kỹ năng cần đạt:
- `$0`
- `in`
- `Engineering`
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.sh
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵