Changes between Version 9 and Version 10 of YM_Course_2009/Lab4
- Timestamp:
- Jul 4, 2009, 11:32:23 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
YM_Course_2009/Lab4
v9 v10 132 132 11 7 39 133 133 }}} 134 * nl 指令可以拿來統計行號 134 * nl 指令可以拿來統計行號,效果與 cat -n 一樣 135 135 {{{ 136 ubuntu@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 {{{ 151 ubuntu@ubuntu:~$ head -n 2 cat-test.txt 152 aaa1 153 bbb2 154 ubuntu@ubuntu:~$ tail -n 3 cat-test.txt 155 fff6 156 ggg7 136 157 137 158 }}}