当前位置:网站首页>Shell programming (script) (variable)
Shell programming (script) (variable)
2022-07-25 03:48:00 【Ybc_ Jame】
Define variable naming :
- Only English letters can be used for naming , Numbers and underscores , The first character cannot begin with a number .
- No spaces in between , You can use underscores _.
- You can't use punctuation .
- Out of commission bash Keywords in ( You can use help Command to view reserved keywords ).
Using variables
#!/bin/bash
your="tome"
echo $your
A read-only variable
#!/bin/bash
myUrl="https://www.google.com"
readonly myUrl
myUrl="https://www.runoob.com"
Delete variables
#!/bin/bash
your="tome"
echo $your
your="alibaba"
unset your
echo $your
Variable type
- local variable : Local variables are defined in scripts or commands , At present only shell Valid in instance , other shell Started program cannot access local variables .
- environment variable : All procedures , Include shell Program started , Can access environment variables , Some programs need environment variables to ensure their normal operation . When necessary shell Scripts can also define environment variables .
- shell Variable :shell Variables are derived from shell Special variables for program settings .shell Some of the variables are environment variables , Some of them are local variables , These variables guarantee shell Normal operation of
边栏推荐
- Chapter 18 request matcher serverwebexchangematcher of oauth2loginauthenticationwebfilter
- Hal library serial port for note taking
- 弹性布局(display:flex下 align-content、justify-content、align-items三个属性的作用和效果
- 基于ABP实现DDD--领域逻辑和应用逻辑
- Display: the function and effect of align content, justify content and align items under flex
- Force deduction question 3
- [Flink] transform operator flatmap
- Postgraduate entrance examination experience
- 01_ Education 2
- Question D: pruning shrubs
猜你喜欢

Pytorch deep learning practice lesson 8 importing data

What is technical support| Daily anecdotes

Detailed explanation of kubernetes network plug-in - flannel chapter

Li Kou 279 complete square - dynamic programming

Network security - information hiding - use steganography to prevent sensitive data from being stolen

NC | progress has been made in the study of the ecological network relationship between dissolved organic carbon and microorganisms in the context of global change

Swagger key configuration items

Uniapp picker select the effect demo of provinces and cities (finishing)

Operations in shell

应急响应全栈
随机推荐
MIM command
Use go language to import Doris data through stream load
Interview question 05.06. integer conversion
Implementing DDD based on ABP -- domain logic and application logic
Detailed explanation of kubernetes network plug-in - flannel chapter
It took me 2 years from Foxconn assembly line to Tencent software testing post~
Question B: shunzi date
Sword finger offer II 041. Average value of sliding window_____ Using queue / loop array implementation
[Flink] protocol operator reduce
Display: the function and effect of align content, justify content and align items under flex
[brother hero July training] day 19: binary tree
Calculation method of confusion matrix
Lombok detailed introduction
The relationship between private domain traffic and fission marketing. What is super app? Can our enterprise own it?
Li Kou 279 complete square - dynamic programming
基于ABP实现DDD--领域逻辑和应用逻辑
How chemical enterprises choose digital service providers with dual prevention mechanism
Acwing 870. approximate number
Bond network card mode setting
Task02 | EDA initial experience