Skip to content

Commit 4bdc2a2

Browse files
committed
update shell part
1 parent 0488ccc commit 4bdc2a2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

JavaKnowledge/常用命令行大全.md

+23
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,29 @@ function NAME() {
565565
```
566566
function关键字可以省略。
567567

568+
###### 命令代换
569+
570+
```shell
571+
DATE=`date`
572+
echo $DATE
573+
```
574+
由“`”反引号括起来的也是一条命令,Shell先执行该命令,然后将输出结果立刻代换到当前命令行中,也可以用$()表示:
575+
```shell
576+
DATE = $(date)
577+
```
578+
579+
580+
####### 输入输出
581+
echo: 显示文本行或变量,或者把字符串输入到文件
582+
583+
###### tee
584+
tee 命令把结果输出到标准输出,另一个副本输出到相应文件中。
585+
586+
587+
588+
589+
590+
568591

569592
----
570593
- 邮箱 :charon.chui@gmail.com

0 commit comments

Comments
 (0)