当前位置:网站首页>Variable declaration and some special variables in shell
Variable declaration and some special variables in shell
2022-06-24 08:36:00 【Chen Bucheng I】
There are several points to observe or pay attention to when declaring variables :
- stay SHELL The variables defined in are more direct , No type difference .
- There can be no spaces between variable names and equal signs .
- The first character of a variable name must be a letter .
- You can use underscores in variable names .
- There can be no spaces in the variable name , Dollar symbol $, Punctuation .
- Variable names cannot use keywords .
Now use mind map , More intuitive
$0: File name of the current script
$n: Parameters passed to a script or function .n It's a number , Indicates the number of parameters . for example , The first parameter is $1, The second parameter is $2.
$#: Number of arguments passed to script or function .
$*: All parameters passed to a script or function .
[email protected]: All parameters passed to a script or function . By double quotes (" ") Inclusion time , And $* not quite the same , I'll talk about .
$?: Exit status of last command , Or the return value of the function .
$$: At present Shell process ID. about Shell Script , It's the process of these scripts ID
边栏推荐
- Markdown 实现文内链接跳转
- 问题3 — messageBox弹框,修改默认背景色
- Take my brother to do the project. It's cold
- 问题4 — DatePicker日期选择器,2个日期选择器(开始、结束日期)的禁用
- 2021-03-16 comp9021 class 9 notes
- The reason why the qtimer timer does not work
- ZUCC_ Principles of compiling language and compilation_ Experiment 04 language and grammar
- pyQt 中 QMenu 响应
- QTimer定时器不起作用的原因
- Question 4 - datepicker date selector, disabling two date selectors (start and end dates)
猜你喜欢

Redis的Cluster集群数据倾斜

ZUCC_ Principles of compiling language and compilation_ Experiment 03 getting started with compiler

权限模型 DAC ACL RBAC ABAC

WCF TCP protocol transmission

Live broadcast review | detailed explanation of koordinator architecture of cloud native hybrid system (complete ppt attached)

【微服务~Nacos】Nacos服务提供者和服务消费者

Pat 1157: school anniversary

List of Li Bai's 20 most classic poems

jwt(json web token)

小样本故障诊断 - 注意力机制代码 - BiGRU代码解析实现
随机推荐
2021-03-16 comp9021 class 9 notes
ZUCC_ Principles of compiling language and compilation_ Experiment 04 language and grammar
JS scroll div scroll bar to bottom
pyQt 常用系统的事件
Use cpulimit to free up your CPU
The article takes you to understand the security of Windows operating system and protect your computer from infringement
成为IEEE学生会员
小样本故障诊断 - 注意力机制代码 - BiGRU代码解析实现
Three categories of financial assets under the new standards: AMC, fvoci and FVTPL
AUTO PWN
Matlab求解线性方程组Ax=b
【微服务~Nacos】Nacos服务提供者和服务消费者
Introduction to RCNN, fast RCNN and fast RCNN
【力扣10天SQL入门】Day2
Export MySQL database to xxx SQL, set xxx The SQL file is imported into MySQL on the server. Project deployment.
[acnoi2022] not a structure, more like a structure
Easycvr invokes the interface parameter acquisition method and precautions of device video recording on the page
WPS的JS宏实现图片正文在同一段落的分离方法
Five level classification of loans
Micro build low code online "quick registration applet" capability