Builtin shell variables
Builtin shell variables are predefined and are global variables that we can use in our script at any point of time. These are reserved shell variables and some of them may have a default value assigned by bash
. Some variables' value will depend upon your current shell environment setup. The different type of shell may have a few specific reserved variables to it. All builtin shell variables' name will be in uppercase.
A few reserved shell variables available in bash
shell are as follows:
Shell variables available in bash |
Description |
---|---|
|
This is the absolute path of the current |
|
This is the version number of |
|
This is the process ID of the current |
|
Get Linux Shell Scripting Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.