当前位置:网站首页>shell基础知识(退出控制、输入输出等)
shell基础知识(退出控制、输入输出等)
2022-07-25 11:57:00 【Test_the_rookie】
一、退出控制
break:退出当前循环,不会进入下一次循环。默认退出一层,想要退出两层循环需使用:break2
continue:退出当前循环,并进入下一次循环。
exit:退出脚本
return:整个函数返回
二、实用小命令
$!:可以查看后台最新运行的进程id
():代码命令在子shell中运行
{}:代表在当前shell中运行
&:让进程进入后台运行 ==》 进程名 & (进程进入后台运行,不影响前台的操作)
$$:查看当前运行脚本的pid
set:获取当前所有的变量
env:获取可以传递给子进程的变量
三、输入输出:
read:读取输入
>> :向指定文件中追加内容
> :将内容添加到指定文件中(会覆盖原本存在的内容)
<:读取指定文件的内容
I:管道符,前一个命令产生的结果可以传递给后一个命令使用
四、通配符
echo * :打印当前目录下的所有目录
echo ?:打印与?匹配的文件
echo “*???”:输出名称与???部分匹配的文件
边栏推荐
- Scott+scott law firm plans to file a class action against Yuga labs, or will confirm whether NFT is a securities product
- [high concurrency] deeply analyze the execution process of worker threads in the thread pool through the source code
- Script set random user_ agent
- Jenkins configuration pipeline
- 【高并发】通过源码深度分析线程池中Worker线程的执行流程
- 我在源头SQLServer里面登记绝对删除的数据,传到MaxComputer,在数据清洗的时候写绝对
- Musk's "eternal soul": half hype, half flicker
- 【十】比例尺添加以及调整
- mysql的表分区
- Fault tolerant mechanism record
猜你喜欢

2.1.2 application of machine learning

Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network

Fiddler抓包APP

什么是CI/CD?

Alibaba cloud technology expert Qin long: reliability assurance is a must - how to carry out chaos engineering on the cloud?

Kyligence 入选 Gartner 2022 数据管理技术成熟度曲线报告

cmake 学习使用笔记(二)库的生成与使用

搭建Vision Transformer系列实践,终于见面了,Timm库!

From cloud native to intelligent, in-depth interpretation of the industry's first "best practice map of live video technology"

客户端开放下载, 欢迎尝鲜
随机推荐
Median (two point answer + two point search)
2.1.2 机器学习的应用
[fluent -- example] case 1: comprehensive example of basic components and layout components
Feign use
Those young people who left Netease
【二】栅格数据显示拉伸色带(以DEM数据为例)
推荐系统-协同过滤在Spark中的实现
R language ggplot2 visualization: use the ggstripchart function of ggpubr package to visualize the dot strip chart, set the palette parameter to configure the color of data points at different levels,
Eureka registration center opens password authentication - record
2022 Henan Mengxin League game (3): Henan University I - Travel
Monit installation and use
2022.07.24(LC_6125_相等行列对)
R language ggplot2 visualization: use the ggviolin function of ggpubr package to visualize the violin graph, set the add parameter to add jitter data points and mean standard deviation vertical bars (
Plus版SBOM:流水线物料清单PBOM
MySQL implements inserting data from one table into another table
numpy初识
PyTorch进阶训练技巧
mysql的表分区
Ansible
919. Complete binary tree inserter: simple BFS application problem