Skip to content

Commit a812943

Browse files
ZhuangZhu-74jaywcjlove
authored andcommitted
Update sed.md date.md (jaywcjlove#109)
* Update date.md 修复了我自己之前更新时引入的错误 * Update sed.md 修正markdown格式
1 parent c693771 commit a812943

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

‎command/date.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ echo $difference seconds.
157157
最常用的方法:
158158

159159
```shell
160-
echo -e "Current time: $(date +"%Y%m%d")"
160+
echo "Current time: $(date +"%Y/%m/%d")"
161161
```
162162

163163
另一种方法:

‎command/sed.md‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,25 +373,22 @@ sed [options] -f scriptfile file(s)
373373
```shell
374374
sed -n 'p;n' test.txt #奇数行
375375
sed -n 'n;p' test.txt #偶数行
376-
377-
```shell
376+
```
378377

379378
方法2:
380379

381380
```shell
382381
sed -n '1~2p' test.txt #奇数行
383382
sed -n '2~2p' test.txt #偶数行
384-
385-
```shell
383+
```
386384

387385
### 打印匹配字符串的下一行
388386

389387
```shell
390388
grep -A 1 SCC URFILE
391389
sed -n '/SCC/{n;p}' URFILE
392390
awk '/SCC/{getline; print}' URFILE
393-
394-
```shell
391+
```
395392

396393

397394
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->

0 commit comments

Comments
 (0)