Changes between Version 9 and Version 10 of YM_Course_2009/Lab4


Ignore:
Timestamp:
Jul 4, 2009, 11:32:23 AM (15 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • YM_Course_2009/Lab4

    v9 v10  
    132132     11       7      39
    133133}}}
    134  * nl 指令可以拿來統計行號
     134 * nl 指令可以拿來統計行號,效果與 cat -n 一樣
    135135{{{
     136ubuntu@ubuntu:~$ cat cat-test.txt | nl
     137     1  aaa1
     138     2  bbb2
     139     3  ccc3
     140       
     141     4  ddd4
     142     5  eee5
     143       
     144       
     145     6  fff6
     146     7  ggg7
     147}}}
     148 * 有時候輸出太多,想要分頁慢慢看的話,可以用 more 跟 less 來看。
     149 * 另外,可以用 head 跟 tail 來顯示開頭或結尾特定行數的內容
     150{{{
     151ubuntu@ubuntu:~$ head -n 2 cat-test.txt
     152aaa1
     153bbb2
     154ubuntu@ubuntu:~$ tail -n 3 cat-test.txt
     155fff6
     156ggg7
    136157
    137158}}}