close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": libp11-kit.so.0: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Jul 11, 2012, 12:25:59 PM (13 years ago)
- Author:
-
jazz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v2
|
v3
|
|
| 24 | 24 | || 13 ||移動系統||Google正在研究並生產新的基於移動端的,連網的作業系統|| |
| 25 | 25 | || 9 ||教育創新||Google想要更多的計算機科學家和工程師,所以它準備自己"製造"他們|| |
| | 26 | |
| | 27 | == awk & sed == |
| | 28 | |
| | 29 | * 問題:有時候在處理一些有順序的文字檔時,需要把他們轉換成一行,此時如何用 awk 抓取上下的一行呢? |
| | 30 | * 答案: getline |
| | 31 | {{{ |
| | 32 | ~$ cat google-research.txt | awk '/Google/ { A=$1; getline; B=$1; getline; C=$1; print C" ||"B"||"A"||"}' | sed 's#研究方 向:##' | sed 's#研究論文發表數量:##' | sort -nr |
| | 33 | }}} |