当前位置:网站首页>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
边栏推荐
- Solve mysql5.6 database specified key was too long; Max key length is 767 bytes
- Use of CCleaner
- VMware installation
- Matplotlib tutorial (I) [getting to know Matplotlib first]
- Chrome debugging skills
- Wechat applet authorized login (including obtaining basic information and binding mobile number)
- Leetcode.745. prefix and suffix search____ Double dictionary tree + double pointer
- Time complexity and space complexity
- Unity: test rotation function
- C language file operation
猜你喜欢

Electronic bidding procurement mall system: optimize traditional procurement business and speed up enterprise digital upgrading

Li Kou 279 complete square - dynamic programming

Pytorch deep learning practice lesson 8 importing data

B. Almost Ternary Matrix

Servlet个人实操笔记(一)

Calculation method of confusion matrix

Fiddler grabs packets and displays err_ TUNNEL_ CONNECTION_ FAILED

What is technical support| Daily anecdotes

Question D: pruning shrubs

Original | ueditor1.4.3-asmx bypasses WAF
随机推荐
Display: the function and effect of align content, justify content and align items under flex
LeetCode. 302 weekly games___ 03_ 6121. Query the number smaller than k after cutting the number____ sort
Day 10: BGP border gateway protocol
.net6 miniapi (V): Options
Customized view considerations
B. Almost Ternary Matrix
226. Flip binary tree DFS method
Interview question 05.06. integer conversion
Moveit2 - 8. Motion planning API
Solution: owner's smart site supervision cloud platform
[Flink] submit the jar package to the Flink cluster and run it
Introduction to Apache Doris grafana monitoring indicators
基于ABP实现DDD--领域逻辑和应用逻辑
How chemical enterprises choose digital service providers with dual prevention mechanism
基于SSM实现后勤报修系统
01_ Education 2
word怎么取消退出修订模式
Use of CCleaner
Analysis of DNS domain name resolution process
Zhanrui Mobile Phone Unlocked