Update sed.md date.md (#109)

* Update date.md

修复了我自己之前更新时引入的错误

* Update sed.md

修正markdown格式
This commit is contained in:
ZhuangZhu-74 2019-05-24 15:13:27 +08:00 committed by 小弟调调™
parent c6937714c0
commit a8129437eb
2 changed files with 4 additions and 7 deletions

View File

@ -157,7 +157,7 @@ echo $difference seconds.
最常用的方法:
```shell
echo -e "Current time: $(date +"%Y%m%d")"
echo "Current time: $(date +"%Y/%m/%d")"
```
另一种方法:

View File

@ -373,16 +373,14 @@ sed [options] -f scriptfile file(s)
```shell
sed -n 'p;n' test.txt #奇数行
sed -n 'n;p' test.txt #偶数行
```shell
```
方法2
```shell
sed -n '1~2p' test.txt #奇数行
sed -n '2~2p' test.txt #偶数行
```shell
```
### 打印匹配字符串的下一行
@ -390,8 +388,7 @@ sed -n '2~2p' test.txt #偶数行
grep -A 1 SCC URFILE
sed -n '/SCC/{n;p}' URFILE
awk '/SCC/{getline; print}' URFILE
```shell
```
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->