asp.net mvc barcode reader Configuring Your Shell with Special Shell Variables in Software

Printer QR Code 2d barcode in Software Configuring Your Shell with Special Shell Variables

Configuring Your Shell with Special Shell Variables
Recognizing QR In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
QR Printer In None
Using Barcode printer for Software Control to generate, create QR image in Software applications.
When you log into your account, the system generates a shell for you. This shell is referred to as either your login shell or your user shell. When you execute scripts, you are generating subshells of your user shell. You can define variables within your user shell, and you can also define environment variables that can be referenced by any subshells you generate. Linux sets up special shell variables you can use to configure your user shell. Many of these special shell variables are defined by the system when you log in, but you define others yourself. See Table 13-2 for a list of the commonly used ones. Table 13-2: BASH Shell Special Variables and Features BASH Shell Special Description Variables HOME LOGNAME USER SHELL BASH_ENV Pathname for user's home directory Login name Login name Pathname of program for type of shell you are using Holds name of BASH initialization script executed whenever a BASH shell script is run or BASH shell entered. Usually $HOME/.bashrc List of pathnames for directories searched for executable commands Primary shell prompt Secondary shell prompt Interfield delimiter symbol
QR Recognizer In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
QR Code ISO/IEC18004 Drawer In C#
Using Barcode printer for Visual Studio .NET Control to generate, create QR Code image in .NET applications.
PATH PS1 PS2 IFS
Printing QR Code In .NET Framework
Using Barcode maker for ASP.NET Control to generate, create Denso QR Bar Code image in ASP.NET applications.
Creating QR Code JIS X 0510 In .NET Framework
Using Barcode creator for .NET Control to generate, create QR Code JIS X 0510 image in VS .NET applications.
Table 13-2: BASH Shell Special Variables and Features BASH Shell Special Description Variables MAIL MAILCHECK MAILPATH TERM CDPATH EXINIT BASH Shell Features $ set -+o feature Bash shell features are turned on and off with the set command; -o sets a feature on and +o turns it off: $ set -o noclobber set noclobber on $ set +o noclobber set noclobber off Disabled CTRL-D logout Does not overwrite files through redirection Disables special characters used for filename expansion: *, , ~, and [] Name of mail file checked by mail utility for received messages Interval for checking for received mail List of mail files to be check by mail for received messages Terminal name Pathnames for directories searched by cd command for subdirectories Initialization commands for Ex/Vi editor
Quick Response Code Generation In Visual Basic .NET
Using Barcode printer for .NET Control to generate, create QR Code ISO/IEC18004 image in .NET applications.
Code 39 Extended Printer In None
Using Barcode drawer for Software Control to generate, create Code-39 image in Software applications.
ignoreeof noclobber noglob
Print Barcode In None
Using Barcode creation for Software Control to generate, create bar code image in Software applications.
Creating UCC-128 In None
Using Barcode maker for Software Control to generate, create USS-128 image in Software applications.
A reserved set of keywords is used for the names of these special variables. You should not use these keywords as the names of any of your own variable names. The special shell variables are all specified in uppercase letters, making them easy to identify. Shell feature variables are in lowercase letters. For example, the keyword HOME is used by the system to define the HOME variable. HOME is a special environment variable that holds the pathname of the user's home directory. On the other hand, the keyword noclobber, covered earlier in the chapter, is used to set the noclobber feature on or off.
Data Matrix 2d Barcode Creation In None
Using Barcode encoder for Software Control to generate, create Data Matrix ECC200 image in Software applications.
Bar Code Generation In None
Using Barcode maker for Software Control to generate, create bar code image in Software applications.
Common Special Variables
Print British Royal Mail 4-State Customer Barcode In None
Using Barcode creator for Software Control to generate, create RM4SCC image in Software applications.
Drawing GS1 DataBar Expanded In Visual Studio .NET
Using Barcode printer for Visual Studio .NET Control to generate, create GS1 DataBar Stacked image in .NET framework applications.
Many of the special variables automatically defined and assigned initial values by the system when you log in can be changed, if you wish. Some special variables exist whose values should not be changed, however. For example, the HOME variable holds the pathname for your home directory. Commands, such as cd, reference the pathname in the HOME special variable to locate your home directory. Some of the more common of these special variables are described in this section. Other special variables are defined by the system and given an initial value that you are free to change. To do this, you redefine them and assign a new value. For example, the PATH variable is defined by the system and given an initial value; it contains the pathnames of directories where commands are located. Whenever you execute a command, the shell searches for it in these directories. You can add a new directory to be searched by redefining the PATH variable yourself, so it will include the new directory's pathname. Still other special variables exist that the system does not define. These are usually optional features, such as the EXINIT variable that enables you to set options for the Vi editor. Each time you log in, you must define and assign a value to such variables.
Decoding UPC A In C#.NET
Using Barcode scanner for VS .NET Control to read, scan read, scan image in VS .NET applications.
Recognizing EAN-13 In Visual Basic .NET
Using Barcode reader for .NET framework Control to read, scan read, scan image in VS .NET applications.
Note You can obtain a listing of the currently defined special variables using the env command. The env command operates like the set command, but it only lists special variables. You can automatically define special variables using special shell scripts called initialization files. An initialization file is a specially named shell script executed whenever you enter a certain shell. You can edit the initialization file and place in it definitions and assignments for special variables. When you enter the shell, the initialization file will execute these definitions and assignments, effectively initializing special variables with your own values. For example, the BASH shell's .bash_profile file is an initialization file executed every time you log in. It contains definitions and assignments of special variables. However, the .bash_profile file is basically only a shell script, which you can edit with any text editor such as the Vi editor, changing, if you wish, the values assigned to special variables. In the BASH shell, all the special variables are designed to be environment variables. When you define or redefine a special variable, you also need to export it to make it an environment variable. This means any change you make to a special variable must be accompanied by an export command. You shall see that at the end of the login initialization file, .bash_profile, there is usually an export command for all the special variables defined in it. The HOME variable contains the pathname of your home directory. Your home directory is determined by the system administrator when your account is created. The pathname for your home directory is automatically read into your HOME variable when you log in. In the next example, the echo command displays the contents of the HOME variable:
Bar Code Drawer In Visual C#.NET
Using Barcode encoder for .NET Control to generate, create barcode image in .NET framework applications.
Bar Code Scanner In VB.NET
Using Barcode reader for .NET Control to read, scan read, scan image in VS .NET applications.
Drawing EAN / UCC - 13 In None
Using Barcode printer for Online Control to generate, create EAN 13 image in Online applications.
Print EAN128 In Java
Using Barcode generator for Java Control to generate, create UCC - 12 image in Java applications.
Copyright © OnBarcode.com . All rights reserved.