Bash Shell Variable:
Variable is a way to store the data at particular memory location as temporary. The variables are processed same as programming variable for holding the information. Bash store the data on a particular identifier that helps to retrieve the information and stored also.
1. Local variable:
It is a variable that available in current shell and uses for processing the information. We use particular identifier and assign the value using equal sign and display the value of the variable using $ symbol. A variable can be exported to another shell.
2. Environmental Variable:
It is a variable that allows defining the system related information. Linux system provides a different built-in variable to display the particular value which is maintained in the system. This type of variables also known as the global variable. It means these variables can be used at all shell which is defined into the system.
3. Bash reserve variable:
Besh shell provides different types of variable system define that contain a particular value related to the system. The Pwd, Hostname, Ps1, Lang, Uid etc are the reserved variable for a shell. We can display the value of these variables using a particular command.
The Prompt Environment Variable:
It is the environmental variable that allows managing the prompt of Unix command. The Ps1 and Ps2 variable are used to manage the prompt of the command line. Ps1 store the character as interpreted by Besh. And Ps2 is used for another prompt.
\d: it is used for date
\h: it is used for hostname
\H: it is used for displaying the complete hostname
\n: for new line
\u: for current username
\#: display current command number
\w: display current working directory
The Path Environment Variable:
It is an environment variable that allows maintaining the system application path which helps to execute the application. We can display the system path with the help of path variable.
The Mail Environment Variable:
The mail variable displays the details of incoming mails. The system contains the incoming mails in a particular folder that display to the user on a command prompt. There are different instruction used on command prompt for executing the mail related information. The mail directly available in /home/black mad/mail/inbox↵.
The Term Environment Variable:
It is a variable that displays the terminal name which is connected to the system. We can connect the system with the help of terminal name for sharing the information.
1. Configuration variable:
This types of the variable have managed the configuration of the file like path Ps1, Ps2 etc. The system uses different files to manage the configuration of the file like path Ps1, Ps2 etc. The system uses different files to manage the configuration like hardware and other components. The text editor opens the file into editing mode for setting the configuration.
2. Information variable:
These type of common variable contain the information about the user, group, path etc. We can display the details information about the user and other components of the operating system. The UID, GID, HOME etc are the information variable.
Bash Command Line:
Bash shell allows managing the different processing using different commands. It provides to manage the command line in a particular order like split the line into two words, Expand aliases, expand Carley braced statement, expand tilde statements, expand variables, use input-output re-direction, run the commands.
1. Escape character:
It is a character represented by \. It is basically used to expand the contents for matching the pattern with the wildcard to omit the feature. We use this symbol(/\) with a wildcard for searching the particular file or processing.
find -name fo\*↵
2. Expansion with Quote:
The quote symbol is used to define the wildcards for processing more than one file together. We define the wildcard into the single quote.
Login Vs Non-login Shell:
A login shell is a shell that starts the system using login process. It is an important concept to start the system and control the initial process. This shell is any created at X-window system and use Su command to switch from one user to another.
Bash Startup Task:
The system uses configuration item that helps to start the computer and its processing. The system set the default setting and manage the environment variable and its value at the time of system startup. Bash shell uses a file to maintain the startup processing and login shell etc. The system uses this file to control the login process and set the value at environment variable. This file is known as profile and is available in the etc directory. A file also used to manage the non-login process that is known as bash rc. A non-login shell is a startup in some other way to switch to another user.
Bash Exit Task:
There is the certain task that a user wants to perform when they log-out a system. In this process, the system deletes temporary files, maintain the backup process etc. Besh shell uses a file to manage the log-out process and identified by bash layout. When a login shell exit all commands are placed in this file that is available in user home directory. The user can also manage the logout process using GUI component with the help of X-window system. This script automatically logout after ending the X-session.