对于本篇技巧,我创建了一个玩具式的文件查看应用程序,它可以读取url或本地文件并使用编号的行和一个类似wc的摘要显示读取内容。
For this tip, I created a toy file-viewing application that reads a URL or local file and displays it with numbered lines and a wc-like summary.
第一行(编号为 0)包含源模式。
The first row (with the number 0) contains the source schema.
我们也会检查某一行是否为空,如果是空的话,则不进行显示和编号。
We also check if a line is blank, and skip showing and numbering it if so. For example, combined with ls we can get
So line 1, I've numbered the lines just for the sake of discussion.
因此,第一行,这些行,我已经编号以方便讨论。
应用推荐