Книги автора: Fedora™ Unleashed, 2008 edition
/ Книги автора: Fedora™ Unleashed, 2008 edition
/ honorato bonafe
Книга: Fedora™ Unleashed, 2008 edition
Accessing Variable Values
Accessing Variable Values
You can access the value of a variable by prefixing the variable name with a $
(dollar sign). That is, if the variable name is var
, you can access the variable by using $var
.
If you want to assign the value of var
to the variable lcount
, you can do so as follows:
Command | Environment |
---|---|
lcount=$var |
bash |
set lcount=$var |
tcsh |
Оглавление статьи/книги
Похожие страницы
- Using Variables in Shell Scripts
- Assigning a Value to a Variable
- Accessing Array Elements
- 8.5.2 Typical Condition Variable Operations
- Using Double Quotes to Resolve Variables in Strings with Embedded Spaces
- Accessing the Command Line
- Access Variable Data Files in the
- Using Environment Variables
- Perl Variables and Data Structures
- Perl Variable Types
- Special Variables
- Class and Object Variables