1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 00:42:08 +02:00

^: update Chinese translation (#14135)

This commit is contained in:
Yi Liu 2024-10-13 06:05:34 +08:00 committed by GitHub
parent c27f921f2d
commit 780cf44a18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,17 +1,21 @@
# Caret
> 在 Bash 中,有一个内建命令可以快速替换前一个命令中的字符串并执行结果。
> 相当`!!:s^string1^string2`
> Bash 内置命令,用于快速替换上一个命令中的字符串并运行结果。
> 等效`!!:s^string1^string2`
> 更多信息:<https://gnu.org/software/bash/manual/bash.html#Event-Designators>.
- 运行前一个命令,将`字符串1`替换为`字符串2`:
- 运行上一个命令,将 `字符串 1` 替换为 `字符串 2`:
`^{{字符串1}}^{{字符串2}}`
`^{{字符串 1}}^{{字符串 2}}`
- 从前一个命令中移除`字符串1`:
- 从上一个命令中移除 `字符串 1`:
`^{{字符串1}}^`
`^{{字符串 1}}^`
- 在前一个命令中将`字符串1`替换为`字符串2`,并在末尾添加`字符串3`:
- 在上一个命令中将 `字符串 1` 替换为 `字符串 2`,并在其末尾添加 `字符串 3`:
`^{{字符串1}}^{{字符串2}}^{{字符串3}}`
`^{{字符串 1}}^{{字符串 2}}^{{字符串 3}}`
- 替换所有出现的 `字符串 1`
`^{{字符串 1}}^{{字符串 2}}^:&`