mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-24 04:16:29 +08:00
Merge pull request #333 from miuc/master
zh: update taocl for chinese language
This commit is contained in:
commit
b71341d816
1 changed files with 2 additions and 1 deletions
|
@ -318,8 +318,9 @@ mkdir empty && rsync -r --delete empty/ some-dir && rmdir some-dir
|
|||
- 运行这个函数从这篇文档中随机获取一条技巧(解析 Markdown 文件并抽取项目):
|
||||
```sh
|
||||
function taocl() {
|
||||
curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md |
|
||||
curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README-zh.md|
|
||||
pandoc -f markdown -t html |
|
||||
iconv -f 'utf-8' -t 'unicode' |
|
||||
xmlstarlet fo --html --dropdtd |
|
||||
xmlstarlet sel -t -v "(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]" |
|
||||
xmlstarlet unesc | fmt -80
|
||||
|
|
Loading…
Reference in a new issue