惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threat Research - Cisco Blogs
博客园 - 聂微东
小众软件
小众软件
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
TaoSecurity Blog
TaoSecurity Blog
博客园 - 司徒正美
罗磊的独立博客
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
S
Security @ Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
月光博客
月光博客
S
Secure Thoughts
P
Proofpoint News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Forbes - Security
Forbes - Security
H
Heimdal Security Blog
W
WeLiveSecurity
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
L
LangChain Blog
T
The Blog of Author Tim Ferriss
NISL@THU
NISL@THU
Google DeepMind News
Google DeepMind News
Cloudbric
Cloudbric
H
Hacker News: Front Page
The Last Watchdog
The Last Watchdog
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
博客园 - 三生石上(FineUI控件)
博客园_首页
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Schneier on Security
Project Zero
Project Zero
SecWiki News
SecWiki News
爱范儿
爱范儿
The Register - Security
The Register - Security
AI
AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Y
Y Combinator Blog
L
Lohrmann on Cybersecurity
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Privacy International News Feed
J
Java Code Geeks
S
Securelist
C
Cyber Attacks, Cyber Crime and Cyber Security
V
Visual Studio Blog

Bash

Linux bash 脚本监控和重启一个守护进程 - V2EX 有个脚本代码的问题 Bash Script 代码比较,你认为哪个更加容易理解? 有使用 kitty 当日常终端的老哥吗? - V2EX 在输入命令时,自动调用 fzf 进行模糊匹配 使用 shell 的 bash -c "functions"时,是不是所有相关的函数都得声明出来? shell 比较浮点数大小的问题,顺便吐槽以下 shell - V2EX bash-completor:声明式编写 Bash 补全脚本 - V2EX sudo 改用 pkexec 的问题 - V2EX sed 如何查找替换反斜杠 - V2EX lobash 发布 v0.5.0 版本 - V2EX 为什么这样写无法连接(join)数组各项? - V2EX 如何使用 awk 打印 nginx 404 日志的目录 - V2EX 请教一下,怎么把向终端输入的内容重定向一份到文件? - V2EX 请教一下 shell 里使用 jq 处理 json 应该怎么写 - V2EX 求一个 wsl2 ubuntu20.04 的默认 /etc/bash.bashrc - V2EX 如何让 bash 的补全 popup 显示 - V2EX 如何去除 Bash variable expansion 后加的单引号? - V2EX 初学者写了个 bash 脚本,求大佬点评 - V2EX tar 使用管道的困惑 - V2EX 如何获取命令标准输出到变量里并保留颜色?或者能不能一边输出一边赋值或判断。 - V2EX 请问如何在 alias 命令里传递参数? - V2EX Bash 下如何优雅地临时在后台运行程序并易于管理? - V2EX shell tr -cd 匹配字符串问题 - V2EX shell 中的 import 能不能支持 as 或 alias 类似功能 - V2EX Shell 多个文本间隔追加的方法 - V2EX 生产服务器集群被黑了,帮看看这个脚本 - V2EX 如何实现一个符合规范的 shell? - V2EX 请教下如何检测文件是否存在 - V2EX bash 里面有 io 多路复用吗? - V2EX 闲的蛋疼,用 shell 写了个拓扑排序。。。 - V2EX echo '1 2'|awk "{print $2}"的输出为什么是 1 2 - V2EX Shell 中冒号变成了斜线 - V2EX 大家觉得 shell 如何呢? - V2EX 如何让 ls 默认带--group-directories-first 选项 - V2EX shell 脚本用 expect 输入密码,密码带有{}导致 expect 报错 - V2EX 询问一个正则表达式,请大家帮忙 - V2EX 请教 Shell 空字符串数组的问题 - V2EX 统计一下,如果你在用 bash,用什么版本号的 bash? - V2EX sh 可以运行后执行一段脚本吗? bash 是可以的。 - V2EX bash shell history search - V2EX Shell 给变量的赋值里带 $ 要怎么写? - V2EX [求助] shell 处理 yaml - V2EX 今天想合并文件写出个递归。。。 - V2EX 啊,我中毒了 - V2EX 寻一段 shell 来实现自动填写 ssh 登录密码 - V2EX 秀一下原生的 “终端.app”(bash) - V2EX # [求助] 用 curl 抓取一个网站,网站有很多分页,但不论怎么指 page=[2-100],抓取的都只是 page=1 的内容... - V2EX 请问这段 shell 代码有设么问题吗 - V2EX
请教一个 bash 的问题 - V2EX
davidxj · 2019-08-07 · via Bash

这是一个创建于 2503 天前的主题,其中的信息可能已经有所发展或是发生改变。

看书的时候看到一个命令,不是很懂,mkdir test & $_ 这个$_是什么意思的,请问

jasonyang9

1

jasonyang9      2019 年 8 月 7 日

* $_ most recent parameter (or the abs path of the command to start the current shell immediately after startup).

```
[root@localhost ~]# echo "This is a test"
This is a test
[root@localhost ~]# echo $_
This is a test
[root@localhost ~]#
```

davidxj

3

davidxj      2019 年 8 月 7 日

@jasonyang9 这个命令在这里意义不明,我理解的是$_是个变量,里面是上一条命令的倒数第一个参数,echo 可以看到,但是在我看到的这个命令来好像不对啊

ahsjs

4

ahsjs      2019 年 8 月 7 日   ❤️ 2

$0
当前脚本名称

$#
传递给脚本或函数的参数个数

$*
传递给脚本或函数的所有参数。

$?
上个命令的退出状态,或函数的返回值。

$$
当前 Shell 进程 ID。对于 Shell 脚本,就是这些脚本所在的进程 ID。

$_
保存之前执行的命令最后一个参数

hhhsuan

6

hhhsuan      2019 年 8 月 7 日

仅这一句是无意义的

davidxj

7

davidxj      2019 年 8 月 7 日

@hhhsuan 多问一句,按照这个错误命令的意思是想建完文件夹之后,cd 进去,请问,这个应该是怎么写才正确