当前位置:网站首页>Shell Basics (exit control, input and output, etc.)
Shell Basics (exit control, input and output, etc.)
2022-07-25 12:44:00 【Test_ the_ rookie】
One 、 Out of control
break: Exit the current loop , Will not enter the next cycle . Exit one layer by default , To exit the two-level loop, you need to use :break2
continue: Exit the current loop , And into the next cycle .
exit: Exit script
return: The entire function returns
Two 、 Practical commands
$!: You can view the latest running process in the background id
(): The code command is in sub shell Run in
{}: Represents at present shell Run in
&: Let the process run in the background ==》 Process name & ( The process enters the background to run , It does not affect the operation of the front desk )
$$: View the currently running script pid
set: Get all current variables
env: Get the variables that can be passed to the child process
3、 ... and 、 Input and output :
read: Read input
>> : Add content to the specified file
> : Add content to the specified file ( Will overwrite the original content )
<: Read the contents of the specified file
I: Pipe, , The result of the previous command can be passed to the next command
Four 、 wildcard
echo * : Print all directories under the current directory
echo ?: Printing and ? Matching files
echo “*???”: Output name and ??? Partially matched files
边栏推荐
- 【五】页面和打印设置
- mysql有 flush privileges 吗
- How to access DMS database remotely? What is the IP address? What is the user name?
- 【Flutter -- 布局】层叠布局(Stack和Positioned)
- The first scratch crawler
- Leetcode 0133. clone diagram
- Interviewer: "classmate, have you ever done a real landing project?"
- 【5】 Page and print settings
- 【七】图层显示和标注
- 【Flutter -- 实例】案例一:基础组件 & 布局组件综合实例
猜你喜欢

基于Caffe ResNet-50网络实现图片分类(仅推理)的实验复现

Pytorch project practice - fashionmnist fashion classification

What is ci/cd?

【Flutter -- 实例】案例一:基础组件 & 布局组件综合实例

WPF project introduction 1 - Design and development of simple login page

MySQL exercise 2
软件测试流程包括哪些内容?测试方法有哪些?

Want to go whoring in vain, right? Enough for you this time!

word样式和多级列表设置技巧(二)

Pytorch visualization
随机推荐
Selenium uses -- XPath and analog input and analog click collaboration
logstash
word样式和多级列表设置技巧(二)
吕蒙正《破窑赋》
A hard journey
PyTorch项目实战—FashionMNIST时装分类
LeetCode 0133. 克隆图
PyTorch可视化
阿里云技术专家秦隆:可靠性保障必备——云上如何进行混沌工程?
【Rust】引用和借用,字符串切片 (slice) 类型 (&str)——Rust语言基础12
Jenkins配置流水线
【五】页面和打印设置
【八】取色器的巧用
What is ci/cd?
软件测试流程包括哪些内容?测试方法有哪些?
【10】 Scale bar addition and adjustment
【Flutter -- 布局】层叠布局(Stack和Positioned)
3.2.1 what is machine learning?
状态(State)模式
SSTI template injection vulnerability summary [bjdctf2020]cookie is so stable